Class: SavonHelper::StringMapping
- Inherits:
-
TypeMapping
- Object
- TypeMapping
- SavonHelper::StringMapping
- Defined in:
- lib/savon_helper/type_mappings.rb
Overview
StringMapping maps Savon data to Ruby strings.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from TypeMapping
Converting collapse
-
#to_native(data, interface) ⇒ String
Convert from Savon data to Ruby strings.
-
#to_savon(value) ⇒ String
Convert from Ruby string type to Savon data.
Instance Method Summary collapse
- #default_value ⇒ Object abstract
- #object_klass ⇒ Class abstract
-
#type_string ⇒ String
Return the class description represented by the mapping.
Methods inherited from TypeMapping
Constructor Details
This class inherits a constructor from SavonHelper::TypeMapping
Instance Method Details
#default_value ⇒ Object
This method is abstract.
Return the default value the mapping.
216 217 218 |
# File 'lib/savon_helper/type_mappings.rb', line 216 def default_value "" end |
#object_klass ⇒ Class
This method is abstract.
Return the class represented by the mapping.
TODO:
Is this really neccessary?
204 205 206 |
# File 'lib/savon_helper/type_mappings.rb', line 204 def object_klass String end |
#to_native(data, interface) ⇒ String
Convert from Savon data to Ruby strings
188 189 190 |
# File 'lib/savon_helper/type_mappings.rb', line 188 def to_native(data, interface) data.to_s end |
#to_savon(value) ⇒ String
Convert from Ruby string type to Savon data
195 196 197 |
# File 'lib/savon_helper/type_mappings.rb', line 195 def to_savon(value) value.to_s end |
#type_string ⇒ String
Return the class description represented by the mapping.
210 211 212 |
# File 'lib/savon_helper/type_mappings.rb', line 210 def type_string "String" end |