Class: Morpheus::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/morpheus/filter.rb

Instance Method Summary collapse

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

#nameObject



9
10
11
# File 'lib/morpheus/filter.rb', line 9

def name
  @name
end