Method: OpenStruct#method_missing

Defined in:
lib/cali.rb

#method_missing(method, value = nil) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/cali.rb', line 23

def method_missing(method, value = nil)
  method = method.to_s
  if method.match(/^(.*)=$/)
    @hsh[$1] = value
  else
    @hsh[method]
  end
end