Permalink
Browse files

Consistence in the block style

  • Loading branch information...
1 parent 5402b72 commit a49727213c3f5906a3fbbfa552256312e0cc319e @rafaelfranca rafaelfranca committed Jan 17, 2014
@@ -159,7 +159,7 @@ def key?(key)
#
# counters.fetch('foo') # => 1
# counters.fetch(:bar, 0) # => 0
- # counters.fetch(:bar) {|key| 0} # => 0
+ # counters.fetch(:bar) { |key| 0 } # => 0
# counters.fetch(:zoo) # => KeyError: key not found: "zoo"
def fetch(key, *extras)
super(convert_key(key), *extras)
@@ -172,7 +172,7 @@ def fetch(key, *extras)
# hash[:b] = 'y'
# hash.values_at('a', 'b') # => ["x", "y"]
def values_at(*indices)
- indices.collect {|key| self[convert_key(key)]}
+ indices.collect { |key| self[convert_key(key)] }
end
# Returns an exact copy of the hash.
@@ -228,11 +228,11 @@ def deep_symbolize_keys; to_hash.deep_symbolize_keys! end
def to_options!; self end
def select(*args, &block)
- dup.tap { |hash| hash.select!(*args, &block)}
+ dup.tap { |hash| hash.select!(*args, &block) }
end
def reject(*args, &block)
- dup.tap { |hash| hash.reject!(*args, &block)}
+ dup.tap { |hash| hash.reject!(*args, &block) }
end
# Convert to a regular hash with string keys.
@@ -29,7 +29,7 @@ def encode_with(coder)
end
def reject(*args, &block)
- dup.tap { |hash| hash.reject!(*args, &block)}
+ dup.tap { |hash| hash.reject!(*args, &block) }
end
def nested_under_indifferent_access

0 comments on commit a497272

Please sign in to comment.