Exception: HamlParser::IndentTracker::InconsistentIndent

Inherits:
Error
  • Object
show all
Defined in:
lib/haml_parser/indent_tracker.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#lineno

Instance Method Summary collapse

Constructor Details

#initialize(previous_size, current_size, lineno) ⇒ InconsistentIndent

Returns a new instance of InconsistentIndent.



18
19
20
21
22
# File 'lib/haml_parser/indent_tracker.rb', line 18

def initialize(previous_size, current_size, lineno)
  super("Inconsistent indentation: #{current_size} spaces used for indentation, but the rest of the document was indented using #{previous_size} spaces.", lineno)
  @previous_size = previous_size
  @current_size = current_size
end

Instance Attribute Details

#current_sizeObject (readonly)

Returns the value of attribute current_size.



16
17
18
# File 'lib/haml_parser/indent_tracker.rb', line 16

def current_size
  @current_size
end

#previous_sizeObject (readonly)

Returns the value of attribute previous_size.



16
17
18
# File 'lib/haml_parser/indent_tracker.rb', line 16

def previous_size
  @previous_size
end