class WsdlMapper::TypeMapping::Base
Attributes
xml_types[RW]
Public Class Methods
new(&block)
click to toggle source
# File lib/wsdl_mapper/type_mapping/base.rb, line 10 def initialize(&block) instance_exec(&block) MappingSet.default << self end
Public Instance Methods
maps?(t)
click to toggle source
# 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
register_xml_types(names)
click to toggle source
# 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
requires()
click to toggle source
# File lib/wsdl_mapper/type_mapping/base.rb, line 43 def requires [] end
ruby_type()
click to toggle source
# File lib/wsdl_mapper/type_mapping/base.rb, line 39 def ruby_type raise NotImplementedError end
to_ruby(_string)
click to toggle source
# File lib/wsdl_mapper/type_mapping/base.rb, line 31 def to_ruby(_string) raise NotImplementedError end
to_xml(_object)
click to toggle source
# File lib/wsdl_mapper/type_mapping/base.rb, line 35 def to_xml(_object) raise NotImplementedError end