Exception: Utopia::Content::Processor::UnbalancedTagError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/utopia/content/processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scanner, start_position, current_tag, closing_tag) ⇒ UnbalancedTagError

Returns a new instance of UnbalancedTagError.



59
60
61
62
63
64
65
66
67
# File 'lib/utopia/content/processor.rb', line 59

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::Location.new(@scanner.string, @start_position)
	@ending_line = Trenni::Parser::Location.new(@scanner.string, @scanner.pos)
end

Instance Attribute Details

#closing_tagObject (readonly)

Returns the value of attribute closing_tag.



72
73
74
# File 'lib/utopia/content/processor.rb', line 72

def closing_tag
  @closing_tag
end

#current_tagObject (readonly)

Returns the value of attribute current_tag.



71
72
73
# File 'lib/utopia/content/processor.rb', line 71

def current_tag
  @current_tag
end

#scannerObject (readonly)

Returns the value of attribute scanner.



69
70
71
# File 'lib/utopia/content/processor.rb', line 69

def scanner
  @scanner
end

#start_positionObject (readonly)

Returns the value of attribute start_position.



70
71
72
# File 'lib/utopia/content/processor.rb', line 70

def start_position
  @start_position
end

Instance Method Details

#to_sObject



74
75
76
# File 'lib/utopia/content/processor.rb', line 74

def to_s
	"Unbalanced Tag Error. Line #{@starting_line}: #{@current_tag} has been closed by #{@closing_tag} on line #{@ending_line}!"
end