Method: Confg::Configuration#method_missing
- Defined in:
- lib/confg/configuration.rb
#method_missing(method_name, *args, &block) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/confg/configuration.rb', line 79 def method_missing(method_name, *args, &block) if method_name.to_s =~ /^(.+)=$/ && !args.empty? self.set($1, args.first) elsif method_name.to_s =~ /^([^=]+)$/ if block_given? self.set_block($1, &block) elsif @attributes.respond_to?($1) @attributes.send($1, *args) else self.get($1) end else super end end |