Class: Kaiseki::BasicParser
- Includes:
- Parseable
- Defined in:
- lib/parser_basic.rb
Direct Known Subclasses
Action, CustomParser, GetVar, InsertVar, MultiParser, PackageParser, RegexpParser, StringParser, SymbolParser
Instance Attribute Summary collapse
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(expected) ⇒ BasicParser
constructor
A new instance of BasicParser.
- #to_s ⇒ Object
Methods included from Parseable
#&, #action, #and?, #cast, #filter, #list, #merge, #not!, #one_or_more, #optional, #override, #parse, #predicate?, #protect, #repeat, #set, #skip, #tag_error, #tag_result, #to_parseable, #validate, #zero_or_more, #|
Constructor Details
#initialize(expected) ⇒ BasicParser
Returns a new instance of BasicParser.
6 7 8 |
# File 'lib/parser_basic.rb', line 6 def initialize expected @expected = expected end |
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
4 5 6 |
# File 'lib/parser_basic.rb', line 4 def expected @expected end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
10 11 12 |
# File 'lib/parser_basic.rb', line 10 def eql? other other.is_a?(self.class) and other.expected == @expected end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/parser_basic.rb', line 16 def to_s @expected.inspect end |