Class: ConvenientService::Utils::Hash::Except Private
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Hash::Except
- Defined in:
- lib/convenient_service/utils/hash/except.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #hash ⇒ Object readonly private
- #keys ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Hash private
- #initialize(hash, keys) ⇒ void constructor private
Methods inherited from Support::Command
Constructor Details
#initialize(hash, keys) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 |
# File 'lib/convenient_service/utils/hash/except.rb', line 34 def initialize(hash, keys) @hash = hash @keys = keys end |
Instance Attribute Details
#hash ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/convenient_service/utils/hash/except.rb', line 21 def hash @hash end |
#keys ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/convenient_service/utils/hash/except.rb', line 27 def keys @keys end |
Instance Method Details
#call ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/convenient_service/utils/hash/except.rb', line 46 def call hash.slice(*hash.keys - keys) end |