class JSend::HashUtils

Public Class Methods

has_fields_different_from(hash, fields) click to toggle source
# File lib/jsend/hash_utils.rb, line 8
def self.has_fields_different_from(hash, fields)
  not remove_fields(hash.clone, fields).empty?
end
remove_fields(hash, fields) click to toggle source
# File lib/jsend/hash_utils.rb, line 4
def self.remove_fields(hash, fields)
  hash.keep_if { |x| !fields.include? x }
end