Method: Framework::Config#method_missing

Defined in:
lib/framework/config.rb

#method_missing(method_name, *args, &block) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/framework/config.rb', line 21

def method_missing(method_name, *args, &block)
  case args.count
  when 0
    self[method_name]
  when 1
    mname = method_name.to_s

    if mname.end_with?('=')
      self[mname.sub('=', '').to_sym] = *args
    else
      super
    end
  else
    super
  end
end