lib/money_s3/builders/vlajky.rb in money_s3-0.5.0 vs lib/money_s3/builders/vlajky.rb in money_s3-0.6.0

- old
+ new

@@ -5,17 +5,20 @@ module Builders class Vlajky include BaseBuilder def builder - root = Ox::Element.new(element_name) + root = Ox::Element.new(name) + if data.respond_to? :attributes + data.attributes.each { |k, v| root[k] = v } + end - if attributes.key? :global - root << VlajkaType.new(attributes[:global], 'Global').builder + if data.key? :global + root << VlajkaType.new('Global', data[:global]).builder end - if attributes.key? :user - root << VlajkaType.new(attributes[:user], 'User').builder + if data.key? :user + root << VlajkaType.new('User', data[:user]).builder end root end end \ No newline at end of file