Exception: Utopia::Content::Processor::UnbalancedTagError
- Inherits:
-
StandardError
- Object
- StandardError
- Utopia::Content::Processor::UnbalancedTagError
- Defined in:
- lib/utopia/content/processor.rb
Instance Attribute Summary collapse
-
#closing_tag ⇒ Object
readonly
Returns the value of attribute closing_tag.
-
#current_tag ⇒ Object
readonly
Returns the value of attribute current_tag.
-
#scanner ⇒ Object
readonly
Returns the value of attribute scanner.
-
#start_position ⇒ Object
readonly
Returns the value of attribute start_position.
Instance Method Summary collapse
-
#initialize(scanner, start_position, current_tag, closing_tag) ⇒ UnbalancedTagError
constructor
A new instance of UnbalancedTagError.
- #to_s ⇒ Object
Constructor Details
#initialize(scanner, start_position, current_tag, closing_tag) ⇒ UnbalancedTagError
Returns a new instance of UnbalancedTagError.
36 37 38 39 40 41 42 43 44 |
# File 'lib/utopia/content/processor.rb', line 36 def initialize(scanner, start_position, current_tag, closing_tag) @scanner = scanner @start_position = start_position @current_tag = current_tag @closing_tag = closing_tag @starting_line = Trenni::Parser.line_at_offset(@scanner.string, @start_position) @ending_line = Trenni::Parser.line_at_offset(@scanner.string, @scanner.pos) end |
Instance Attribute Details
#closing_tag ⇒ Object (readonly)
Returns the value of attribute closing_tag.
49 50 51 |
# File 'lib/utopia/content/processor.rb', line 49 def closing_tag @closing_tag end |
#current_tag ⇒ Object (readonly)
Returns the value of attribute current_tag.
48 49 50 |
# File 'lib/utopia/content/processor.rb', line 48 def current_tag @current_tag end |
#scanner ⇒ Object (readonly)
Returns the value of attribute scanner.
46 47 48 |
# File 'lib/utopia/content/processor.rb', line 46 def scanner @scanner end |
#start_position ⇒ Object (readonly)
Returns the value of attribute start_position.
47 48 49 |
# File 'lib/utopia/content/processor.rb', line 47 def start_position @start_position end |
Instance Method Details
#to_s ⇒ Object
51 52 53 54 |
# File 'lib/utopia/content/processor.rb', line 51 def to_s "Unbalanced Tag Error. " \ "Line #{@starting_line[:line_number]}: #{@current_tag} has been closed by #{@closing_tag} on line #{@ending_line[:line_number]}!" end |