Class: Rbexy::Nodes::Text
- Inherits:
-
Object
- Object
- Rbexy::Nodes::Text
- Defined in:
- lib/rbexy/nodes.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(content) ⇒ Text
constructor
A new instance of Text.
Constructor Details
#initialize(content) ⇒ Text
Returns a new instance of Text.
28 29 30 |
# File 'lib/rbexy/nodes.rb', line 28 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
26 27 28 |
# File 'lib/rbexy/nodes.rb', line 26 def content @content end |
Instance Method Details
#compile ⇒ Object
32 33 34 |
# File 'lib/rbexy/nodes.rb', line 32 def compile "\"#{Util.safe_string(content)}\"" end |