Exception: HamlParser::IndentTracker::IndentMismatch

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(current_level, indent_levels, lineno) ⇒ IndentMismatch

Returns a new instance of IndentMismatch.



8
9
10
11
12
# File 'lib/haml_parser/indent_tracker.rb', line 8

def initialize(current_level, indent_levels, lineno)
  super("Unexpected indent level: #{current_level}: indent_level=#{indent_levels}", lineno)
  @current_level = current_level
  @indent_levels = indent_levels
end

Instance Attribute Details

#current_levelObject (readonly)

Returns the value of attribute current_level.



6
7
8
# File 'lib/haml_parser/indent_tracker.rb', line 6

def current_level
  @current_level
end

#indent_levelsObject (readonly)

Returns the value of attribute indent_levels.



6
7
8
# File 'lib/haml_parser/indent_tracker.rb', line 6

def indent_levels
  @indent_levels
end