Exception: HamdownCore::IndentTracker::InconsistentIndent

Inherits:
Error
  • Object
show all
Defined in:
lib/hamdown_core/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.



19
20
21
22
23
# File 'lib/hamdown_core/indent_tracker.rb', line 19

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.



17
18
19
# File 'lib/hamdown_core/indent_tracker.rb', line 17

def current_size
  @current_size
end

#previous_sizeObject (readonly)

Returns the value of attribute previous_size.



17
18
19
# File 'lib/hamdown_core/indent_tracker.rb', line 17

def previous_size
  @previous_size
end