Class: SyntaxTree::Haml::Format::PrefixPart

Inherits:
Struct
  • Object
show all
Defined in:
lib/syntax_tree/haml/format.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#prefix ⇒ Object

Returns the value of attribute prefix

Returns:

  • (Object) —

    the current value of prefix



193
194
195
# File 'lib/syntax_tree/haml/format.rb', line 193

def prefix
  @prefix
end

#value ⇒ Object

Returns the value of attribute value

Returns:

  • (Object) —

    the current value of value



193
194
195
# File 'lib/syntax_tree/haml/format.rb', line 193

def value
  @value
end

Instance Method Details

#format(q, align) ⇒ Object



194
195
196
# File 'lib/syntax_tree/haml/format.rb', line 194

def format(q, align)
  q.text("#{prefix}#{value}")
end

#length ⇒ Object



198
199
200
# File 'lib/syntax_tree/haml/format.rb', line 198

def length
  prefix.length + value.length
end