Class: Poncho::Filters::Filter
- Inherits:
-
Object
- Object
- Poncho::Filters::Filter
- Defined in:
- lib/poncho/filters.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(options = {}, &block) ⇒ Filter
constructor
A new instance of Filter.
- #to_proc ⇒ Object
Constructor Details
#initialize(options = {}, &block) ⇒ Filter
Returns a new instance of Filter.
13 14 15 16 |
# File 'lib/poncho/filters.rb', line 13 def initialize( = {}, &block) = @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
11 12 13 |
# File 'lib/poncho/filters.rb', line 11 def block @block end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/poncho/filters.rb', line 11 def end |
Instance Method Details
#call(*args) ⇒ Object
22 23 24 |
# File 'lib/poncho/filters.rb', line 22 def call(*args) block.call(*args) end |
#to_proc ⇒ Object
18 19 20 |
# File 'lib/poncho/filters.rb', line 18 def to_proc block.to_proc end |