Class: RParsec::Failure

Inherits:
Object
  • Object
show all
Defined in:
lib/rparsec/error.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ind, input, message = nil) ⇒ Failure

Returns a new instance of Failure.



13
14
15
16
17
# File 'lib/rparsec/error.rb', line 13

def initialize(ind, input, message = nil)
  @index = ind
  @input = input
  @msg = message
end

Instance Attribute Details

#indexObject

Returns the value of attribute index.



20
21
22
# File 'lib/rparsec/error.rb', line 20

def index
  @index
end

#inputObject (readonly)

Returns the value of attribute input.



19
20
21
# File 'lib/rparsec/error.rb', line 19

def input
  @input
end

Instance Method Details

#msgObject



22
# File 'lib/rparsec/error.rb', line 22

def msg = @msg.to_s