Skip to content
Browse files

Cleanup

  • Loading branch information...
1 parent 8fc2888 commit ed304af94aa19ef584e998f97e5d851ea61e2a0c @laserlemon laserlemon committed
View
4 lib/json_spec/configuration.rb
@@ -13,7 +13,7 @@ def excluded_keys
end
def excluded_keys=(keys)
- @excluded_keys = keys.map{|k| k.to_s }.uniq
+ @excluded_keys = keys.map(&:to_s).uniq
end
def exclude_keys(*keys)
@@ -29,7 +29,7 @@ def directory=(directory)
end
def reset
- instance_variables.each{|iv| remove_instance_variable(iv) }
+ instance_variables.each{|ivar| remove_instance_variable(ivar) }
end
end
end
View
2 lib/json_spec/helpers.rb
@@ -1,4 +1,4 @@
-require 'multi_json'
+require "multi_json"
module JsonSpec
module Helpers
View
4 lib/json_spec/matchers/be_json_eql.rb
@@ -32,12 +32,12 @@ def to_file(path)
end
def excluding(*keys)
- excluded_keys.merge(keys.map{|k| k.to_s })
+ excluded_keys.merge(keys.map(&:to_s))
self
end
def including(*keys)
- excluded_keys.subtract(keys.map{|k| k.to_s })
+ excluded_keys.subtract(keys.map(&:to_s))
self
end
View
4 lib/json_spec/matchers/include_json.rb
@@ -31,12 +31,12 @@ def from_file(path)
end
def excluding(*keys)
- excluded_keys.merge(keys.map{|k| k.to_s })
+ excluded_keys.merge(keys.map(&:to_s))
self
end
def including(*keys)
- excluded_keys.subtract(keys.map{|k| k.to_s })
+ excluded_keys.subtract(keys.map(&:to_s))
self
end

0 comments on commit ed304af

Please sign in to comment.
Something went wrong with that request. Please try again.