Class: SyntaxTree::Haml::Format::HashAttributesPart
- Inherits:
-
Struct
- Object
- Struct
- SyntaxTree::Haml::Format::HashAttributesPart
- Defined in:
- lib/syntax_tree/haml/format.rb
Instance Attribute Summary collapse
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
Instance Attribute Details
#values ⇒ Object
Returns the value of attribute values
261 262 263 |
# File 'lib/syntax_tree/haml/format.rb', line 261 def values @values end |
Instance Method Details
#format(q, align) ⇒ Object
262 263 264 |
# File 'lib/syntax_tree/haml/format.rb', line 262 def format(q, align) format_value(q, values) end |
#length ⇒ Object
266 267 268 269 270 |
# File 'lib/syntax_tree/haml/format.rb', line 266 def length values.sum do |key, value| key.length + (value.is_a?(String) ? value : value.to_s).length + 3 end end |