Exception: HamdownCore::IndentTracker::InconsistentIndent
- Defined in:
- lib/hamdown_core/indent_tracker.rb
Instance Attribute Summary collapse
-
#current_size ⇒ Object
readonly
Returns the value of attribute current_size.
-
#previous_size ⇒ Object
readonly
Returns the value of attribute previous_size.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(previous_size, current_size, lineno) ⇒ InconsistentIndent
constructor
A new instance of InconsistentIndent.
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_size ⇒ Object (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_size ⇒ Object (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 |