-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Right now it only support converting true/false and date and times, is there anyways you can support more type for example the standard ones in soap: http://www.pocketsoap.com/4s4c/docs/datatypes.html
def advanced_typecasting(value)
split = value.split
return value if split.size > 1
case split.first
when "true" then true
when "false" then false
when XS_DATE_TIME then try_to_convert(value) {|x| DateTime.parse(x)}
when XS_DATE then try_to_convert(value) {|x| Date.parse(x)}
when XS_TIME then try_to_convert(value) {|x| Time.parse(x)}
else value
end
end
Metadata
Metadata
Assignees
Labels
No labels