Method: EWS::Model#method_missing
- Defined in:
- lib/ews/model.rb
#method_missing(meth, *args) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ews/model.rb', line 19 def method_missing(meth, *args) method_name = meth.to_s if method_name.end_with?('=') attr = method_name.chomp('=').to_sym @attrs[attr] = args.first elsif method_name.end_with?('?') attr = method_name.chomp('?').to_sym @attrs[attr] == true elsif @attrs.has_key?(meth) @attrs[meth] else super meth, *args end end |