Class: Morpheus::Filter
- Inherits:
-
Object
- Object
- Morpheus::Filter
- Defined in:
- lib/morpheus/filter.rb
Instance Method Summary collapse
- #call(element) ⇒ Object
-
#initialize(name, &block) ⇒ Filter
constructor
A new instance of Filter.
- #name ⇒ Object
Constructor Details
#initialize(name, &block) ⇒ Filter
Returns a new instance of Filter.
4 5 6 7 |
# File 'lib/morpheus/filter.rb', line 4 def initialize(name, &block) @name = name @block = block end |
Instance Method Details
#call(element) ⇒ Object
13 14 15 |
# File 'lib/morpheus/filter.rb', line 13 def call(element) @block.call(element) end |
#name ⇒ Object
9 10 11 |
# File 'lib/morpheus/filter.rb', line 9 def name @name end |