Class: SyntaxTree::Haml::Format::PrefixPart
- Inherits:
-
Struct
- Object
- Struct
- SyntaxTree::Haml::Format::PrefixPart
- Defined in:
- lib/syntax_tree/haml/format.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
210 211 212 |
# File 'lib/syntax_tree/haml/format.rb', line 210 def prefix @prefix end |
#value ⇒ Object
Returns the value of attribute value
210 211 212 |
# File 'lib/syntax_tree/haml/format.rb', line 210 def value @value end |
Instance Method Details
#format(q, align) ⇒ Object
211 212 213 |
# File 'lib/syntax_tree/haml/format.rb', line 211 def format(q, align) q.text("#{prefix}#{value}") end |
#length ⇒ Object
215 216 217 |
# File 'lib/syntax_tree/haml/format.rb', line 215 def length prefix.length + value.length end |