Class: WsdlMapper::TypeMapping::Base
- Inherits:
-
Object
- Object
- WsdlMapper::TypeMapping::Base
- Defined in:
- lib/wsdl_mapper/type_mapping/base.rb
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (Object) xml_types
Returns the value of attribute xml_types.
Instance Method Summary (collapse)
-
- (Base) initialize(&block)
constructor
A new instance of Base.
- - (Boolean) maps?(t)
- - (Object) register_xml_types(names)
- - (Object) requires
- - (Object) ruby_type
- - (Object) to_ruby(string)
- - (Object) to_xml(object)
Constructor Details
- (Base) initialize(&block)
Returns a new instance of Base
10 11 12 13 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 10 def initialize(&block) instance_exec &block MappingSet.default << self end |
Instance Attribute Details
- (Object) xml_types
Returns the value of attribute xml_types
8 9 10 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 8 def xml_types @xml_types end |
Instance Method Details
- (Boolean) maps?(t)
23 24 25 26 27 28 29 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 23 def maps?(t) if t.is_a?(WsdlMapper::Dom::Name) xml_types.include? t elsif t.is_a?(WsdlMapper::Dom::TypeBase) xml_types.include? t.name end end |
- (Object) register_xml_types(names)
15 16 17 18 19 20 21 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 15 def register_xml_types(names) self.xml_types ||= [] names.each do |name_or_qname| qname = name_or_qname.is_a?(WsdlMapper::Dom::Name) ? name_or_qname : WsdlMapper::Dom::BuiltinType[name_or_qname].name self.xml_types << qname end end |
- (Object) requires
43 44 45 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 43 def requires [] end |
- (Object) ruby_type
39 40 41 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 39 def ruby_type raise NotImplementedError end |
- (Object) to_ruby(string)
31 32 33 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 31 def to_ruby(string) raise NotImplementedError end |
- (Object) to_xml(object)
35 36 37 |
# File 'lib/wsdl_mapper/type_mapping/base.rb', line 35 def to_xml(object) raise NotImplementedError end |