Class: Chelsy::Raw
Overview
This node represents arbitrary C code snippet. It can be an decsendant of any node. However it is used mainly in macro definition.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(code, **rest) ⇒ Raw
constructor
Initialize instance.
- #to_s ⇒ Object
Constructor Details
#initialize(code, **rest) ⇒ Raw
Initialize instance.
131 132 133 134 |
# File 'lib/chelsy/ast.rb', line 131 def initialize(code, **rest) @code = Chelsy.immutable_stringify(code) super **rest end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
127 128 129 |
# File 'lib/chelsy/ast.rb', line 127 def code @code end |
Instance Method Details
#to_s ⇒ Object
136 137 138 |
# File 'lib/chelsy/ast.rb', line 136 def to_s @code end |