Class: RParsec::Failure
- Inherits:
-
Object
- Object
- RParsec::Failure
- Defined in:
- lib/rparsec/error.rb
Direct Known Subclasses
Constant Summary collapse
- Precedence =
100
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
-
#initialize(ind, input, message = nil) ⇒ Failure
constructor
A new instance of Failure.
- #msg ⇒ Object
Constructor Details
#initialize(ind, input, message = nil) ⇒ Failure
Returns a new instance of Failure.
10 11 12 |
# File 'lib/rparsec/error.rb', line 10 def initialize(ind, input, = nil) @index, @input, @msg = ind, input, end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
14 15 16 |
# File 'lib/rparsec/error.rb', line 14 def index @index end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
14 15 16 |
# File 'lib/rparsec/error.rb', line 14 def input @input end |
Instance Method Details
#msg ⇒ Object
17 18 19 |
# File 'lib/rparsec/error.rb', line 17 def msg return @msg.to_s end |