class Jekyll::Premonition::Attributes::Stacker

Instances of this class are pushed onto the parser stack upon parsing of block attributes.

Attributes

meta[RW]

Get and set meta attributes for stacker. Used for setting value mode.

type[R]

Get the stacker type. 0 = outside block, 1 = in_between, 2 = key, 3 = value

value[R]

Get the string value from the stacker

Public Class Methods

new(type) click to toggle source

Initialize a new Stacker

type - The stacker type

# File lib/premonition/attributes/stacker.rb, line 20
def initialize(type)
  @value = nil
  @type = type
  @meta = {}
end

Public Instance Methods

append(char) click to toggle source

Append a char to the stacker value

# File lib/premonition/attributes/stacker.rb, line 27
def append(char)
  @value = @value.nil? ? char : "#{@value}#{char}"
end