class Utopia::Content::MarkupParser::UnbalancedTagError

The name of a closing tag fails to match up with the corresponding opening tag.

Attributes

buffer[R]
closing_tag[R]
opening_tag[R]

Public Class Methods

new(buffer, opening_tag, closing_tag = nil) click to toggle source
# File lib/utopia/content/markup.rb, line 75
def initialize(buffer, opening_tag, closing_tag = nil)
        @buffer = buffer
        @opening_tag = opening_tag
        @closing_tag = closing_tag
end

Public Instance Methods

end_location() click to toggle source
# File lib/utopia/content/markup.rb, line 89
def end_location
        if closing_tag and closing_tag.respond_to? :offset
                Trenni::Location.new(@buffer.read, closing_tag.offset)
        end
end
start_location() click to toggle source
# File lib/utopia/content/markup.rb, line 85
def start_location
        Trenni::Location.new(@buffer.read, opening_tag.offset)
end
to_s() click to toggle source
# File lib/utopia/content/markup.rb, line 95
def to_s
        if @closing_tag
                "#{start_location}: #{@opening_tag} was not closed!"
        else
                "#{start_location}: #{@opening_tag} was closed by #{@closing_tag}!"
        end
end