Module: FunWith::Files::CoreExtensions::Hash
- Defined in:
- lib/fun_with/files/core_extensions/hash.rb
Instance Method Summary collapse
- #fwf_blank? ⇒ Boolean
-
#fwf_reverse_merge(other_hash) ⇒ Object
Stolen from: activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 12.
-
#fwf_reverse_merge!(other_hash) ⇒ Object
File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 17.
Instance Method Details
#fwf_blank? ⇒ Boolean
5 6 7 |
# File 'lib/fun_with/files/core_extensions/hash.rb', line 5 def fwf_blank? self.length == 0 end |
#fwf_reverse_merge(other_hash) ⇒ Object
Stolen from: activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 12
10 11 12 |
# File 'lib/fun_with/files/core_extensions/hash.rb', line 10 def fwf_reverse_merge( other_hash ) other_hash.merge( self ) end |
#fwf_reverse_merge!(other_hash) ⇒ Object
File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 17
15 16 17 18 |
# File 'lib/fun_with/files/core_extensions/hash.rb', line 15 def fwf_reverse_merge!(other_hash) # right wins if there is no left merge!( other_hash ){|key,left,right| left } end |