Skip to content

Commit

Permalink
Make compatible with Ruby 1.8 again..
Browse files Browse the repository at this point in the history
  • Loading branch information
jomz committed Nov 22, 2019
1 parent e908eec commit f68b950
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/xero_gateway/base_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def readonly_attributes(*attrs)
end

def from_xml(base_element, gateway = nil)
args = gateway ? [{ gateway: gateway }] : []
args = gateway ? [{ :gateway => gateway }] : []
new(*args).from_xml(base_element)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero_gateway/contact_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def to_xml(b = Builder::XmlMarkup.new)
end

def self.from_xml(contact_group_element, gateway, options = {})
contact_group = ContactGroup.new(gateway: gateway, contacts_downloaded: options[:contacts_downloaded])
contact_group = ContactGroup.new(:gateway => gateway, :contacts_downloaded => options[:contacts_downloaded])
contact_group_element.children.each do |element|
case(element.name)
when "ContactGroupID" then contact_group.contact_group_id = element.text
Expand Down
6 changes: 4 additions & 2 deletions lib/xero_gateway/report.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require_relative './report/cell'
require_relative './report/row'
require(File.expand_path('report/cell', File.dirname(__FILE__)))
require(File.expand_path('report/row', File.dirname(__FILE__)))
# require_relative './report/cell'
# require_relative './report/row'

module XeroGateway
class Report
Expand Down

0 comments on commit f68b950

Please sign in to comment.