Sha256: 746e98086d0b34e80339982be3cc81e87bdab0c632d53523e816344679e26557

Contents?: true

Size: 313 Bytes

Versions: 5

Compression:

Stored size: 313 Bytes

Contents

class Hash
  # Returns a Hash containing only input keys.
  # Method from merb-core.
  def except(*rejected)
    reject { |k,v| rejected.include?(k) }
  end

  # Returns a new hash containing only the input keys.
  # Method from merb-core.
  def only(*allowed)
    reject { |k,v| !allowed.include?(k) }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jsl-feedzirra-0.0.12.10 lib/core_ext/hash.rb
jsl-feedzirra-0.0.12.12 lib/core_ext/hash.rb
jsl-feedzirra-0.0.12.7 lib/core_ext/hash.rb
jsl-feedzirra-0.0.12.8 lib/core_ext/hash.rb
jsl-feedzirra-0.0.12.9 lib/core_ext/hash.rb