We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 900a705 commit ed37cb6Copy full SHA for ed37cb6
lib/gon.rb
@@ -44,16 +44,9 @@ def request=(request_id)
44
45
def method_missing(m, *args, &block)
46
if ( m.to_s =~ /=$/ )
47
- if RUBY_VERSION =~ /1.9/
48
- if public_methods.include? m.to_s[0..-2].to_sym
49
- raise "You can't use Gon public methods for storing data"
50
- end
51
- else
52
- if public_methods.include? m.to_s[0..-2]
53
54
+ if public_methods.include?(RUBY_VERSION =~ /1.9/ ? m.to_s[0..-2].to_sym : m.to_s[0..-2])
+ raise "You can't use Gon public methods for storing data"
55
end
56
-
57
set_variable(m.to_s.delete('='), args[0])
58
else
59
get_variable(m.to_s)
0 commit comments