Method: Pair::Config#method_missing
- Defined in:
- lib/pair/config.rb
#method_missing(method, *args, &block) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/pair/config.rb', line 21 def method_missing(method, *args, &block) method = method.to_s if method =~ /=$/ # setter self[method.gsub(/=$/,'').to_sym] = [*args].first else self[method.to_sym] || super end end |