Class: LiquidXlsx::Validation::Usage

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#assignsObject

Names bound by the fragment itself (assign %, capture %).



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def assigns
  @assigns
end

#cellObject

Returns the value of attribute cell

Returns:

  • (Object)

    the current value of cell



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def cell
  @cell
end

#filtersObject

Returns the value of attribute filters

Returns:

  • (Object)

    the current value of filters



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def filters
  @filters
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def kind
  @kind
end

#localsObject

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

#rowObject

Returns the value of attribute row

Returns:

  • (Object)

    the current value of row



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def row
  @row
end

#sheetObject

Returns the value of attribute sheet

Returns:

  • (Object)

    the current value of sheet



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def sheet
  @sheet
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def source
  @source
end

#variablesObject

Returns the value of attribute variables

Returns:

  • (Object)

    the current value of variables



34
35
36
# File 'lib/liquid_xlsx/validation/usage.rb', line 34

def variables
  @variables
end

Instance Method Details

#to_hObject



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