Class: Kwartz::ExpandStatement
- Defined in:
- lib/kwartz/node.rb
Overview
represents _stag, _cont, _etag, _elem, _element(name), and _content(name)
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #_inspect(indent = 0) ⇒ Object
- #accept(translator) ⇒ Object
-
#initialize(kind, name = nil) ⇒ ExpandStatement
constructor
A new instance of ExpandStatement.
Constructor Details
#initialize(kind, name = nil) ⇒ ExpandStatement
Returns a new instance of ExpandStatement.
147 148 149 150 |
# File 'lib/kwartz/node.rb', line 147 def initialize(kind, name=nil) @kind = kind # symbol @name = name # string end |
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind.
151 152 153 |
# File 'lib/kwartz/node.rb', line 151 def kind @kind end |
#name ⇒ Object (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 |