method
get_attribute
v1_8_7_72 -
Show latest stable
- Class:
SOAP::Mapping
get_attribute(obj, attr_name)public
No documentation available.
# File lib/soap/mapping/mapping.rb, line 274
def self.get_attribute(obj, attr_name)
if obj.is_a?(::Hash)
obj[attr_name] || obj[attr_name.intern]
else
name = XSD::CodeGen::GenSupport.safevarname(attr_name)
if obj.instance_variables.include?('@' + name)
obj.instance_variable_get('@' + name)
elsif ((obj.is_a?(::Struct) or obj.is_a?(Marshallable)) and
obj.respond_to?(name))
obj.__send__(name)
end
end
end