Class: HashFilter::Operation
- Inherits:
-
Object
- Object
- HashFilter::Operation
- Defined in:
- lib/hash_filter.rb
Defined Under Namespace
Instance Method Summary collapse
- #execute(hash, key) ⇒ Object
-
#initialize(key) ⇒ Operation
constructor
A new instance of Operation.
- #matches?(key) ⇒ Boolean
Constructor Details
#initialize(key) ⇒ Operation
Returns a new instance of Operation.
53 54 55 |
# File 'lib/hash_filter.rb', line 53 def initialize(key) @key = key end |
Instance Method Details
#execute(hash, key) ⇒ Object
57 58 59 |
# File 'lib/hash_filter.rb', line 57 def execute(hash, key) raise NotImplementedError end |
#matches?(key) ⇒ Boolean
61 62 63 |
# File 'lib/hash_filter.rb', line 61 def matches?(key) @key === key end |