Class: Ippon::Validate::Sequence
Overview
Instance Attribute Summary collapse
- #left ⇒ Schema readonly
- #right ⇒ Schema readonly
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Sequence
constructor
A new instance of Sequence.
-
#process(result) ⇒ Object
Implements the Ippon::Validate::Schema#process interface.
Methods inherited from Schema
#&, #unhalt, #validate, #validate!, #|
Constructor Details
#initialize(left, right) ⇒ Sequence
Returns a new instance of Sequence.
747 748 749 750 |
# File 'lib/ippon/validate.rb', line 747 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#right ⇒ Schema (readonly)
745 746 747 |
# File 'lib/ippon/validate.rb', line 745 def right @right end |
Instance Method Details
#process(result) ⇒ Object
Implements the Ippon::Validate::Schema#process interface.
753 754 755 756 757 |
# File 'lib/ippon/validate.rb', line 753 def process(result) result = @left.process(result) return result if result.halted? @right.process(result) end |