Exception: HamlParser::IndentTracker::InconsistentIndent
- Defined in:
- lib/haml_parser/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.
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_size ⇒ Object (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_size ⇒ Object (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 |