Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/finance/interval.rb
Instance Method Summary collapse
-
#method_missing(name, *args, &block) ⇒ Integer
convert an integer value representing months (or years) into months.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Integer
convert an integer value representing months (or years) into months
8 9 10 11 12 |
# File 'lib/finance/interval.rb', line 8 def method_missing(name, *args, &block) return self if name.to_s == "months" return self * 12 if name.to_s == "years" super end |