Class: Kwartz::ExpandStatement

Inherits:
Statement show all
Defined in:
lib/kwartz/node.rb

Overview

represents _stag, _cont, _etag, _elem, _element(name), and _content(name)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, name) ⇒ ExpandStatement

Returns a new instance of ExpandStatement.



147
148
149
150
# File 'lib/kwartz/node.rb', line 147

def initialize(kind, name)
  @kind = kind    # symbol
  @name = name    # string
end

Instance Attribute Details

#kindObject

Returns the value of attribute kind.



151
152
153
# File 'lib/kwartz/node.rb', line 151

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



152
153
154
# File 'lib/kwartz/node.rb', line 152

def name
  @name
end

Instance Method Details

#_inspect(indent = 0) ⇒ Object



155
156
157
158
159
160
161
# File 'lib/kwartz/node.rb', line 155

def _inspect(indent=0)
  if @kind == :element || @kind == :content
    return "_#{@kind}(#{@name})\n"
  else
    return "_#{@kind}\n"
  end
end

#accept(translator) ⇒ Object



164
165
166
# File 'lib/kwartz/node.rb', line 164

def accept(translator)
  assert
end