Hi, I have two questions related to ruby, sorry if only specific script related questions belong here.
First, is there any way to do something like:
def action(X)
stuff
end
where X would be a method? For example:
class Array
def example(X)
self.X
end
end
array_1.example(pop)
array_1.example(push(5))
Second, is there anyway of creating a template/algorithim that Ruby/RGSS can use to create methods for a particular class; basically, methods that operate on/make new methods?
Thank you for any help
First, is there any way to do something like:
def action(X)
stuff
end
where X would be a method? For example:
class Array
def example(X)
self.X
end
end
array_1.example(pop)
array_1.example(push(5))
Second, is there anyway of creating a template/algorithim that Ruby/RGSS can use to create methods for a particular class; basically, methods that operate on/make new methods?
Thank you for any help