lib/gon.rb in gon-5.2.3 vs lib/gon.rb in gon-6.0.0

- old
+ new

@@ -2,17 +2,19 @@ require 'action_view' require 'action_controller' require 'multi_json' require 'gon/base' +require 'gon/env_finder' require 'gon/global' require 'gon/watch' require 'gon/request' require 'gon/helpers' require 'gon/escaper' require 'gon/rabl' require 'gon/jbuilder' +require 'gon/jbuilder/parser' require 'gon/json_dumper' # NOTE : ActionDispatch::Request#uuid appears only in Rails 3.2.1 unless ActionDispatch::Request.public_instance_methods.include?(:uuid) require 'gon/compatibility/old_rails' @@ -114,16 +116,10 @@ set_variable(builder, data) end end def public_method_name?(method) - public_methods.include?( - if RUBY_VERSION > '1.9' - method.to_s[0..-2].to_sym - else - method.to_s[0..-2] - end - ) + public_methods.include?(method.to_s[0..-2].to_sym) end # JbuilderTemplate will not be defined if jbuilder is required # before gon. By loading jbuilder again, JbuilderTemplate will # now be defined