Class: SyntaxTree::Haml::Tag::PrefixPart
- Inherits:
-
Struct
- Object
- Struct
- SyntaxTree::Haml::Tag::PrefixPart
- Defined in:
- lib/syntax_tree/haml/tag.rb
Instance Attribute Summary collapse
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#prefix ⇒ Object
Returns the value of attribute prefix
33 34 35 |
# File 'lib/syntax_tree/haml/tag.rb', line 33 def prefix @prefix end |
#value ⇒ Object
Returns the value of attribute value
33 34 35 |
# File 'lib/syntax_tree/haml/tag.rb', line 33 def value @value end |
Instance Method Details
#format(q, align) ⇒ Object
34 35 36 |
# File 'lib/syntax_tree/haml/tag.rb', line 34 def format(q, align) q.text("#{prefix}#{value}") end |
#length ⇒ Object
38 39 40 |
# File 'lib/syntax_tree/haml/tag.rb', line 38 def length prefix.length + value.length end |