class Hash
Public Instance Methods
&(other)
click to toggle source
# File lib/serviceable.rb, line 2 def &(other) reject {|k,v| !(other.include?(k) && ([v]&[other[k]]).any?)} end
compact()
click to toggle source
# File lib/serviceable.rb, line 5 def compact reject {|k,v| k.nil? || v.nil?} end