Class: RablRails::Nodes::Glue
- Inherits:
-
Object
- Object
- RablRails::Nodes::Glue
- Includes:
- Node
- Defined in:
- lib/rabl-rails/nodes/glue.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(template) ⇒ Glue
constructor
A new instance of Glue.
- #instance_variable_data? ⇒ Boolean
- #nodes ⇒ Object
Methods included from Node
Constructor Details
#initialize(template) ⇒ Glue
Returns a new instance of Glue.
8 9 10 |
# File 'lib/rabl-rails/nodes/glue.rb', line 8 def initialize(template) @template = template end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
6 7 8 |
# File 'lib/rabl-rails/nodes/glue.rb', line 6 def template @template end |
Instance Method Details
#data ⇒ Object
12 13 14 |
# File 'lib/rabl-rails/nodes/glue.rb', line 12 def data @template.data end |
#instance_variable_data? ⇒ Boolean
20 21 22 |
# File 'lib/rabl-rails/nodes/glue.rb', line 20 def instance_variable_data? @instance_variable_data ||= data.to_s.start_with?('@') end |
#nodes ⇒ Object
16 17 18 |
# File 'lib/rabl-rails/nodes/glue.rb', line 16 def nodes @template.nodes end |