class Parse::Error
Attributes
pos[R]
@return [Position]
Public Class Methods
new(pos, message)
click to toggle source
@param [Position] pos @param [String] message
Calls superclass method
# File lib/parse.rb, line 97 def initialize(pos, message) super(message) @pos = pos end
Public Instance Methods
or(other)
click to toggle source
@param [Error] other self
.{#pos} must be equal to other
.{#pos}. @return [Error] an {Error} with {Exception#message} combined from
{Exception#message}s of +self+ and +other+ (using "or" word).
# File lib/parse.rb, line 108 def or other raise "#{self.pos} == #{other.pos} is false" unless self.pos == other.pos Error.new(pos, "#{self.message} or #{other.message}") end