Class: Tornados::Filter
- Inherits:
-
Object
- Object
- Tornados::Filter
- Defined in:
- lib/tornados/filter.rb
Instance Method Summary collapse
- #accept?(checked_value) ⇒ Boolean
-
#initialize(lambda) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(lambda) ⇒ Filter
Returns a new instance of Filter.
11 12 13 |
# File 'lib/tornados/filter.rb', line 11 def initialize(lambda) @condition = lambda end |
Instance Method Details
#accept?(checked_value) ⇒ Boolean
15 16 17 |
# File 'lib/tornados/filter.rb', line 15 def accept?(checked_value) condition.call(checked_value) end |