Exception: Utopia::Content::Markup::UnbalancedTagError
- Inherits:
-
StandardError
- Object
- StandardError
- Utopia::Content::Markup::UnbalancedTagError
- Defined in:
- lib/utopia/content/markup.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.
60 61 62 63 64 65 66 67 68 |
# File 'lib/utopia/content/markup.rb', line 60 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::Location.new(@scanner.string, @start_position) @ending_line = Trenni::Location.new(@scanner.string, @scanner.pos) end |
Instance Attribute Details
#closing_tag ⇒ Object (readonly)
Returns the value of attribute closing_tag.
73 74 75 |
# File 'lib/utopia/content/markup.rb', line 73 def closing_tag @closing_tag end |
#current_tag ⇒ Object (readonly)
Returns the value of attribute current_tag.
72 73 74 |
# File 'lib/utopia/content/markup.rb', line 72 def current_tag @current_tag end |
#scanner ⇒ Object (readonly)
Returns the value of attribute scanner.
70 71 72 |
# File 'lib/utopia/content/markup.rb', line 70 def scanner @scanner end |
#start_position ⇒ Object (readonly)
Returns the value of attribute start_position.
71 72 73 |
# File 'lib/utopia/content/markup.rb', line 71 def start_position @start_position end |
Instance Method Details
#to_s ⇒ Object
75 76 77 |
# File 'lib/utopia/content/markup.rb', line 75 def to_s "Unbalanced Tag Error. Line #{@starting_line}: #{@current_tag} has been closed by #{@closing_tag} on line #{@ending_line}!" end |