Class: Tabulatr::Renderer::Filter
- Inherits:
-
Object
- Object
- Tabulatr::Renderer::Filter
- Defined in:
- lib/tabulatr/renderer/filter.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#name ⇒ Object
Returns the value of attribute name.
-
#partial ⇒ Object
Returns the value of attribute partial.
Instance Method Summary collapse
- #filter ⇒ Object
-
#initialize(name, partial: nil, &block) ⇒ Filter
constructor
A new instance of Filter.
- #to_partial_path ⇒ Object
Constructor Details
#initialize(name, partial: nil, &block) ⇒ Filter
Returns a new instance of Filter.
5 6 7 8 9 |
# File 'lib/tabulatr/renderer/filter.rb', line 5 def initialize(name, partial: nil, &block) @name = name @block = block @partial = partial end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
3 4 5 |
# File 'lib/tabulatr/renderer/filter.rb', line 3 def block @block end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/tabulatr/renderer/filter.rb', line 3 def name @name end |
#partial ⇒ Object
Returns the value of attribute partial.
3 4 5 |
# File 'lib/tabulatr/renderer/filter.rb', line 3 def partial @partial end |
Instance Method Details
#filter ⇒ Object
11 12 13 |
# File 'lib/tabulatr/renderer/filter.rb', line 11 def filter :custom end |
#to_partial_path ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/tabulatr/renderer/filter.rb', line 15 def to_partial_path if partial.present? partial else "tabulatr/filter/#{name.to_s.downcase.underscore}" end end |