Class: Arrest::Filter
- Inherits:
-
Object
- Object
- Arrest::Filter
- Defined in:
- lib/arrest/helper/filter.rb
Overview
A filter is a named predicate to limit a collection to a subset with certain features
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, block = nil) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(name, block = nil) ⇒ Filter
Returns a new instance of Filter.
8 9 10 11 |
# File 'lib/arrest/helper/filter.rb', line 8 def initialize name, block = nil @name = name @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
6 7 8 |
# File 'lib/arrest/helper/filter.rb', line 6 def block @block end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/arrest/helper/filter.rb', line 5 def name @name end |