Module: Systeme::Conversions
- Included in:
- Systeme
- Defined in:
- lib/systeme/conversions.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *arguments) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/systeme/conversions.rb', line 5 def method_missing(method_name, *arguments) if match_data = method_name.to_s.match(/in_([a-zA-Z]+)/) if Systeme::Registration::names.include?(match_data[1]) return self / 1.0.send(match_data[1]) end end return super end |