method
get_attribute
Ruby latest stable (v2_5_5)
-
0 notes -
Class: SOAP::Mapping
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
get_attribute(obj, attr_name)
public
Hide source
# 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