Module: CurrencyConvertible

Included in:
Fixnum, Float
Defined in:
lib/simple_currency/currency_convertible.rb

Defined Under Namespace

Classes: Proxy

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



7
8
9
10
# File 'lib/simple_currency/currency_convertible.rb', line 7

def method_missing(method, *args, &block)
  return CurrencyConvertible::Proxy.new(self,method.to_s) if method.to_s.length == 3 # Presumably a currency ("eur", "gbp"...)
  super(method,*args,&block)
end