In Files

Methods

Voodoo::Parser::MultipleErrors

Class wrapping multiple Parser::Errors.

Attributes

errors[R]

Public Class Methods

new(errors) click to toggle source
# File voodoo/parser.rb, line 86
def initialize errors
  @errors = errors
  super(nil, errors[0].input_name, errors[0].start_line,
        errors[0].start_column, nil)
end

Public Instance Methods

message() click to toggle source
# File voodoo/parser.rb, line 94
def message
  if @message == nil
    msg = "Multiple errors:\n\n"
    @errors.each do |error|
      msg << error.input_name << ":" if error.input_name
      msg << "#{error.start_line}: " << error.message
      if error.text != nil
        msg << "\n\n  #{error.text.gsub("\n", "\n  ")}"
      end
      msg << "\n"
    end
    @message = msg
  end
  @message
end
text() click to toggle source
# File voodoo/parser.rb, line 110
def text
  if @text == nil
    texts = @errors.map {|error| error.text}
    @text = texts.join "\n"
  end
  @text
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.