Method: Unit#method_missing
- Defined in:
- lib/unit/dsl.rb
#method_missing(name, system = nil) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/unit/dsl.rb', line 18 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 |