Class: Kaiseki::GetVar
- Inherits:
-
BasicParser
- Object
- BasicParser
- Kaiseki::GetVar
- Defined in:
- lib/var_get.rb
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Attributes inherited from BasicParser
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(expected, parser) ⇒ GetVar
constructor
A new instance of GetVar.
- #to_s ⇒ Object
Methods included from Parseable
#&, #action, #and?, #cast, #filter, #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, parser) ⇒ GetVar
Returns a new instance of GetVar.
5 6 7 8 |
# File 'lib/var_get.rb', line 5 def initialize expected, parser super expected @parser = parser.to_parseable end |
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
3 4 5 |
# File 'lib/var_get.rb', line 3 def parser @parser end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
10 11 12 |
# File 'lib/var_get.rb', line 10 def eql? other other.is_a?(self.class) and other.expected == @expected and other.parser == @parser end |