Class: Rapid::Template::Node::Static
- Defined in:
- lib/rapid/template/node/static.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Attributes inherited from Base
Instance Method Summary collapse
- #==(obj) ⇒ Object
-
#initialize(content) ⇒ Static
constructor
A new instance of Static.
- #inspect ⇒ Object
- #pull(result) ⇒ Object
Methods inherited from Base
#next_node, #next_to, #static?
Constructor Details
#initialize(content) ⇒ Static
Returns a new instance of Static.
9 10 11 |
# File 'lib/rapid/template/node/static.rb', line 9 def initialize content @content = content end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/rapid/template/node/static.rb', line 7 def content @content end |
Instance Method Details
#==(obj) ⇒ Object
17 18 19 |
# File 'lib/rapid/template/node/static.rb', line 17 def == obj obj.is_a?(self.class) && obj.content == @content end |
#inspect ⇒ Object
21 22 23 |
# File 'lib/rapid/template/node/static.rb', line 21 def inspect %(#<static #{@content.inspect}>) end |
#pull(result) ⇒ Object
13 14 15 |
# File 'lib/rapid/template/node/static.rb', line 13 def pull result result.match! @content end |