Class: LiquidXlsx::Nodes::IfNode
- Defined in:
- lib/liquid_xlsx/template_nodes.rb
Overview
An if/elsif/else node: conditional block.
Instance Attribute Summary collapse
-
#branches ⇒ Object
readonly
Returns the value of attribute branches.
-
#endif_row ⇒ Object
readonly
Returns the value of attribute endif_row.
-
#if_row ⇒ Object
readonly
Returns the value of attribute if_row.
Instance Method Summary collapse
-
#initialize(branches, if_row: nil, endif_row: nil) ⇒ IfNode
constructor
branches: [body:, ...] Last branch may have condition: nil for else.
- #rows_after_render ⇒ Object
Constructor Details
#initialize(branches, if_row: nil, endif_row: nil) ⇒ IfNode
branches: [body:, ...] Last branch may have condition: nil for else
51 52 53 54 55 |
# File 'lib/liquid_xlsx/template_nodes.rb', line 51 def initialize(branches, if_row: nil, endif_row: nil) @branches = branches @if_row = if_row @endif_row = endif_row end |
Instance Attribute Details
#branches ⇒ Object (readonly)
Returns the value of attribute branches.
47 48 49 |
# File 'lib/liquid_xlsx/template_nodes.rb', line 47 def branches @branches end |
#endif_row ⇒ Object (readonly)
Returns the value of attribute endif_row.
47 48 49 |
# File 'lib/liquid_xlsx/template_nodes.rb', line 47 def endif_row @endif_row end |
#if_row ⇒ Object (readonly)
Returns the value of attribute if_row.
47 48 49 |
# File 'lib/liquid_xlsx/template_nodes.rb', line 47 def if_row @if_row end |
Instance Method Details
#rows_after_render ⇒ Object
57 58 59 |
# File 'lib/liquid_xlsx/template_nodes.rb', line 57 def rows_after_render 0 # dynamic end |