Class: Hashedrecord::Filtered
- Inherits:
-
Object
- Object
- Hashedrecord::Filtered
- Includes:
- Enumerable, HashedRecord::Chainable
- Defined in:
- lib/hashedrecord/filtered.rb
Instance Method Summary collapse
- #call(child_filter = []) ⇒ Object
-
#initialize(parent, filter) ⇒ Filtered
constructor
A new instance of Filtered.
Methods included from HashedRecord::Chainable
Constructor Details
#initialize(parent, filter) ⇒ Filtered
Returns a new instance of Filtered.
8 9 10 11 |
# File 'lib/hashedrecord/filtered.rb', line 8 def initialize(parent, filter) @parent = parent @filter = filter end |
Instance Method Details
#call(child_filter = []) ⇒ Object
13 14 15 |
# File 'lib/hashedrecord/filtered.rb', line 13 def call(child_filter = []) parent.call([filter] + child_filter) end |