method
rubytype2obj
ruby latest stable - Class:
SOAP::Mapping::RubytypeFactory
rubytype2obj(node, info, map, rubytype)private
No documentation available.
# File lib/soap/mapping/rubytypeFactory.rb, line 295
def rubytype2obj(node, info, map, rubytype)
klass = rubytype ? Mapping.class_from_name(rubytype) : nil
obj = nil
case node
when SOAPString
return @string_factory.soap2obj(klass || String, node, info, map)
when SOAPDateTime
#return @datetime_factory.soap2obj(klass || Time, node, info, map)
klass ||= Time
t = node.to_time
arg = [t.year, t.month, t.mday, t.hour, t.min, t.sec, t.usec]
obj = t.gmt? ? klass.gm(*arg) : klass.local(*arg)
mark_unmarshalled_obj(node, obj)
return true, obj
when SOAPArray
return @array_factory.soap2obj(klass || Array, node, info, map)
when SOAPNil, SOAPBoolean, SOAPInt, SOAPInteger, SOAPDecimal, SOAPDouble
return @basetype_factory.soap2obj(nil, node, info, map)
when SOAPStruct
return rubytypestruct2obj(node, info, map, rubytype)
else
raise
end
end