Class: LiquidXlsx::Validation::Usage
- Inherits:
-
Struct
- Object
- Struct
- LiquidXlsx::Validation::Usage
- Defined in:
- lib/liquid_xlsx/validation/usage.rb
Overview
Everything a single template fragment refers to.
A fragment is one unit of Liquid the renderer will actually parse: a cell
template, a structural {% for %} collection or an {% if %} condition.
kind says which, so a host application can phrase its diagnostics in the
user's terms ("cell B12" vs "the if % in row 12").
kind is one of :cell, :condition, :loop.
Instance Attribute Summary collapse
-
#assigns ⇒ Object
Names bound by the fragment itself (assign %, capture %).
-
#cell ⇒ Object
Returns the value of attribute cell.
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#locals ⇒ Object
Names bound for the fragment's body (for item in ... %, sheet
as:). -
#row ⇒ Object
Returns the value of attribute row.
-
#sheet ⇒ Object
Returns the value of attribute sheet.
-
#source ⇒ Object
Returns the value of attribute source.
-
#variables ⇒ Object
Returns the value of attribute variables.
Instance Method Summary collapse
Instance Attribute Details
#assigns ⇒ Object
Names bound by the fragment itself (assign %, capture %).
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def assigns @assigns end |
#cell ⇒ Object
Returns the value of attribute cell
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def cell @cell end |
#filters ⇒ Object
Returns the value of attribute filters
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def filters @filters end |
#kind ⇒ Object
Returns the value of attribute kind
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def kind @kind end |
#locals ⇒ Object
Names bound for the fragment's body (for item in ... %, sheet as:).
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def locals @locals end |
#row ⇒ Object
Returns the value of attribute row
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def row @row end |
#sheet ⇒ Object
Returns the value of attribute sheet
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def sheet @sheet end |
#source ⇒ Object
Returns the value of attribute source
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def source @source end |
#variables ⇒ Object
Returns the value of attribute variables
34 35 36 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 34 def variables @variables end |
Instance Method Details
#to_h ⇒ Object
54 55 56 57 58 |
# File 'lib/liquid_xlsx/validation/usage.rb', line 54 def to_h { sheet: sheet, row: row, cell: cell, kind: kind, source: source, variables: variables.map(&:to_h), filters: filters, assigns: assigns, locals: locals } end |