Class: BatchlyApi::KeyValuePairStringString
- Inherits:
-
Object
- Object
- BatchlyApi::KeyValuePairStringString
- Defined in:
- lib/batchly_api/models/key_value_pair_string_string.rb
Instance Attribute Summary collapse
-
#key ⇒ String
TODO: Write general description for this method.
-
#value ⇒ String
TODO: Write general description for this method.
Instance Method Summary collapse
-
#key_map ⇒ Object
Defines the key map for json serialization.
- #method_missing(method_name) ⇒ Object
-
#to_json ⇒ Object
Creates JSON of the curent object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
15 16 17 |
# File 'lib/batchly_api/models/key_value_pair_string_string.rb', line 15 def method_missing (method_name) puts "there's no method called '#{method_name}'" end |
Instance Attribute Details
#key ⇒ String
TODO: Write general description for this method
8 9 10 |
# File 'lib/batchly_api/models/key_value_pair_string_string.rb', line 8 def key @key end |
#value ⇒ String
TODO: Write general description for this method
12 13 14 |
# File 'lib/batchly_api/models/key_value_pair_string_string.rb', line 12 def value @value end |
Instance Method Details
#key_map ⇒ Object
Defines the key map for json serialization
26 27 28 29 30 31 |
# File 'lib/batchly_api/models/key_value_pair_string_string.rb', line 26 def key_map hash = {} hash['key'] = self.key hash['value'] = self.value hash end |
#to_json ⇒ Object
Creates JSON of the curent object
20 21 22 23 |
# File 'lib/batchly_api/models/key_value_pair_string_string.rb', line 20 def to_json hash = self.key_map() hash.to_json end |