Class: Rley::Parser::ErrorReason
- Inherits:
-
Object
- Object
- Rley::Parser::ErrorReason
- Defined in:
- lib/rley/parser/error_reason.rb
Overview
Abstract class. An instance represents an explanation describing the likely cause of a parse error detected by Rley.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#rank ⇒ Object
readonly
Returns the value of attribute rank.
Instance Method Summary collapse
-
#initialize(aRank) ⇒ ErrorReason
constructor
Constructor.
-
#inspect ⇒ String
Return this reason's class name and message.
-
#message ⇒ String
The result of invoking reason.to_s.
Constructor Details
#initialize(aRank) ⇒ ErrorReason
Constructor
15 16 17 |
# File 'lib/rley/parser/error_reason.rb', line 15 def initialize(aRank) @rank = aRank end |
Instance Attribute Details
#rank ⇒ Object (readonly)
Returns the value of attribute rank.
11 12 13 |
# File 'lib/rley/parser/error_reason.rb', line 11 def rank @rank end |
Instance Method Details
#inspect ⇒ String
Return this reason's class name and message
25 26 27 |
# File 'lib/rley/parser/error_reason.rb', line 25 def inspect "#{self.class.name}: #{}" end |
#message ⇒ String
Returns the result of invoking reason.to_s.
20 21 22 |
# File 'lib/rley/parser/error_reason.rb', line 20 def return to_s end |