Class: Kaiseki::FilterResult
- Inherits:
-
PackageParser
- Object
- BasicParser
- PackageParser
- Kaiseki::FilterResult
- Defined in:
- lib/result_filter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Attributes inherited from BasicParser
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(expected, node = Node.default, &block) ⇒ FilterResult
constructor
A new instance of FilterResult.
Methods inherited from PackageParser
Methods inherited from BasicParser
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, node = Node.default, &block) ⇒ FilterResult
Returns a new instance of FilterResult.
5 6 7 8 9 |
# File 'lib/result_filter.rb', line 5 def initialize expected, node = Node.default, &block super expected @node = node @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
3 4 5 |
# File 'lib/result_filter.rb', line 3 def block @block end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
3 4 5 |
# File 'lib/result_filter.rb', line 3 def node @node end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
11 12 13 |
# File 'lib/result_filter.rb', line 11 def eql? other other.is_a?(self.class) and other.expected == @expected and other.block == @block end |