Well, playing with the Seph Tutorial, about the RPG::Class, i was making my own method, so I get to a strange part, maybe this is impossible, or no?.
Imagine that I have a RPG::Class called something, and this something, has a attribute called 'name' and 'amount'..
It's possible do this, to make a shorter class? (I mean, to avoid to create the same method, only with change the name?
Any idea?
Thanks.
Imagine that I have a RPG::Class called something, and this something, has a attribute called 'name' and 'amount'..
It's possible do this, to make a shorter class? (I mean, to avoid to create the same method, only with change the name?
Code:
 def gain_"something[id].name"(number)
   something[id].ammount += number
 end
Any idea?
Thanks.