relative_relative ´gold_object´
class Shop_Object
def initialize
gold = Gold.new()
@gold = gold
end
def shop_now
…
@gold.gold_amount -= 100
…
#another file
gold_object
def gold_amount
gold = 200
end
relative_relative ´gold_object´
class Shop_Object
def initialize
gold = Gold.new()
@gold = gold
end
def shop_now
…
@gold.gold_amount -= 100
…
#another file
gold_object
def gold_amount
gold = 200
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs