lib/acumatica/resource.rb in acumatica-0.4.0 vs lib/acumatica/resource.rb in acumatica-0.5.0

- old
+ new

@@ -1,14 +1,9 @@ # frozen_string_literal: true require "active_support/core_ext/string/inflections" require "active_support/core_ext/hash/keys" - -if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.5.0') - require "active_support/core_ext/hash/transform_values" -end - require "ostruct" module Acumatica class Resource < OpenStruct class << self @@ -83,10 +78,10 @@ self.attributes ||= [] attributes.each { |a| self[methodify(a['AttributeID']['value'])] = a['Value']['value'] } end def methodify(string) - string.underscore.parameterize(methodify_separator) + string.underscore.parameterize(**methodify_separator) end def methodify_separator @methodify_separator ||= if Gem.loaded_specs["activesupport"].version < Gem::Version.create("5.0.0")