Skip to content

Instantly share code, notes, and snippets.

@trek
Created October 1, 2008 18:05
Show Gist options
  • Select an option

  • Save trek/14145 to your computer and use it in GitHub Desktop.

Select an option

Save trek/14145 to your computer and use it in GitHub Desktop.
class Economy
def slowing?
self.value.today < self.value.yesterday
end
def slow_by(amount)
self.value -= amount
end
end
class Money
def self.print(amount = 10000)
0.upto(size) do
self.economy << Money.new
end
self.economy.slow_by(amount)
end
end
economy = Economy.new('United States', 'United States Dollars')
while(economy.slowing?)
Money.print
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment