class LLT::Token::Punctuation

Attributes

closing[RW]
opening[RW]
other[RW]

Public Class Methods

new(string, id = nil) click to toggle source
Calls superclass method LLT::Token::new
# File lib/llt/token/punctuation.rb, line 12
def initialize(string, id = nil)
  super
  # this is part of an old interface that is mostly unused
  # some parts remain - find and delete em
  @string = xml_decode(string)
  @opening = false
  @closing = false
  @other   = false
end

Public Instance Methods

as_xml() click to toggle source
# File lib/llt/token/punctuation.rb, line 40
def as_xml
  xml_encode(@string)
end
empty?() click to toggle source

cannot hold anything atm, is therefore never really empty

# File lib/llt/token/punctuation.rb, line 23
def empty?
  false
end
Also aliased as: no_forms?
inspect() click to toggle source
# File lib/llt/token/punctuation.rb, line 36
def inspect
  "#{"Punctuation token:".yellow} #{@string}"
end
no_forms?()
Alias for: empty?
punctuation() click to toggle source
# File lib/llt/token/punctuation.rb, line 32
def punctuation
  @string
end
set_functions() click to toggle source
# File lib/llt/token/punctuation.rb, line 28
def set_functions
  [:punctuation]
end