Class: Yaparc::Succeed
- Inherits:
-
Object
- Object
- Yaparc::Succeed
- Includes:
- Parsable
- Defined in:
- lib/yaparc/succeed.rb
Constant Summary
Constants included from Parsable
Parsable::IS_ALPHANUM, Parsable::IS_CR, Parsable::IS_DIGIT, Parsable::IS_LOWER, Parsable::IS_SPACE, Parsable::IS_WHITESPACE
Instance Attribute Summary collapse
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
Instance Method Summary collapse
-
#initialize(value, remaining = nil) ⇒ Succeed
constructor
A new instance of Succeed.
Methods included from Parsable
Constructor Details
#initialize(value, remaining = nil) ⇒ Succeed
Returns a new instance of Succeed.
9 10 11 12 |
# File 'lib/yaparc/succeed.rb', line 9 def initialize(value, remaining = nil) @parser = ->(input) { OK.new(value:, input:) } @remaining = remaining end |
Instance Attribute Details
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
7 8 9 |
# File 'lib/yaparc/succeed.rb', line 7 def remaining @remaining end |