Skip to content

Commit

Permalink
Fixing issue spox#8
Browse files Browse the repository at this point in the history
  • Loading branch information
swalterd committed Dec 2, 2013
1 parent acf2fbe commit 76ebc04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/soap/mapping/mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def self.class2element(klass)

def self.obj2element(obj)
name = namespace = nil
ivars = obj.instance_variables
ivars = obj.instance_variables.collect{|t| t.to_s}
if ivars.include?('@schema_type')
name = obj.instance_variable_get('@schema_type')
end
Expand Down Expand Up @@ -286,7 +286,7 @@ def self.get_attributes(obj)
else
rs = {}
obj.instance_variables.each do |ele|
rs[ele.sub(/^@/, '')] = obj.instance_variable_get(ele)
rs[ele.to_s.sub(/^@/, '')] = obj.instance_variable_get(ele)
end
rs
end
Expand All @@ -311,7 +311,7 @@ def self.get_attribute(obj, attr_name)
if obj.respond_to?(attr_name)
return obj.__send__(attr_name)
end
iv = obj.instance_variables
iv = obj.instance_variables.collect{|t| t.to_s}
name = Mapping.safevarname(attr_name)
if iv.include?("@#{name}")
return obj.instance_variable_get("@#{name}")
Expand Down

0 comments on commit 76ebc04

Please sign in to comment.