Method: Unit#method_missing
- Defined in:
- lib/unit/dsl.rb
#method_missing(name, system = nil) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/unit/dsl.rb', line 16 def method_missing(name, system = nil) if name.to_s =~ /^in_(.*?)(!?)$/ unit = Unit.method_name_to_unit($1) $2.empty? ? self.in(unit) : self.in!(unit) else super(name, system || @system) end end |