Method: Exchange::Money#method_missing

Defined in:
lib/exchange/money.rb

#method_missing(method, *args, &block) ⇒ Object

Method missing is used to handle conversions from one money object to another. It only handles currencies which are available in the API class set in the configuration.

Examples:

convert to chf

Exchange::Money.new(40,:usd).to(:chf)    

convert to sek at a given time

Exchange::Money.new(40,:nok).to(:sek, :at => Time.gm(2012,2,2))

Since:

  • 0.1



72
73
74
# File 'lib/exchange/money.rb', line 72

def method_missing method, *args, &block
  value.send method, *args, &block
end