Method: EasyTalk::Model::InstanceMethods#method_missing
- Defined in:
- lib/easy_talk/model.rb
#method_missing(method_name, *args) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/easy_talk/model.rb', line 56 def method_missing(method_name, *args) method_string = method_name.to_s if method_string.end_with?('=') property_name = method_string.chomp('=') if self.class.additional_properties_allowed? @additional_properties[property_name] = args.first else super end elsif self.class.additional_properties_allowed? && @additional_properties.key?(method_string) @additional_properties[method_string] else super end end |