Class: Yaparc::Succeed
Overview
of Module Parsable
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.
Attributes included from Parsable
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.
52 53 54 55 56 57 |
# File 'lib/yaparc.rb', line 52 def initialize(value, remaining = nil) @parser = lambda do |input| Result::OK.new(:value => value, :input => input) end @remaining = remaining end |
Instance Attribute Details
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
50 51 52 |
# File 'lib/yaparc.rb', line 50 def remaining @remaining end |