Class: SavonHelper::HintMapping
- Inherits:
-
TypeMapping
- Object
- TypeMapping
- SavonHelper::HintMapping
- Defined in:
- lib/savon_helper/type_mappings.rb
Overview
HintMapping maps Savon data to Ruby objects of type klass (r/o).
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(klass, name = '', description = '') ⇒ HintMapping
constructor
A new instance of ObjectMapping with description for class klass.
- #object_klass ⇒ Class abstract
-
#type_string ⇒ String
Return the class description represented by the mapping.
Methods inherited from TypeMapping
#default_value, #description, #to_native, #to_savon, #warn_unparseable_data
Constructor Details
#initialize(klass, name = '', description = '') ⇒ HintMapping
A new instance of ObjectMapping with description for class klass.
345 346 347 348 |
# File 'lib/savon_helper/type_mappings.rb', line 345 def initialize(klass, name='', description='') super(name, description) @klass = klass end |
Instance Method Details
#object_klass ⇒ Class
This method is abstract.
Return the class represented by the mapping.
354 355 356 |
# File 'lib/savon_helper/type_mappings.rb', line 354 def object_klass @klass end |
#type_string ⇒ String
Return the class description represented by the mapping.
360 361 362 |
# File 'lib/savon_helper/type_mappings.rb', line 360 def type_string "HINT<#{@klass.name_without_namespace}>" end |