Class: Rx::Pattern
- Inherits:
-
Object
- Object
- Rx::Pattern
- Defined in:
- lib/rx/joins/pattern.rb
Instance Attribute Summary collapse
-
#patterns ⇒ Object
readonly
Returns the value of attribute patterns.
Instance Method Summary collapse
- #and(other) ⇒ Object
-
#initialize(patterns) ⇒ Pattern
constructor
A new instance of Pattern.
- #then_do(selector = Proc.new) ⇒ Object
Constructor Details
#initialize(patterns) ⇒ Pattern
4 5 6 |
# File 'lib/rx/joins/pattern.rb', line 4 def initialize(patterns) @patterns = patterns end |
Instance Attribute Details
#patterns ⇒ Object (readonly)
Returns the value of attribute patterns.
3 4 5 |
# File 'lib/rx/joins/pattern.rb', line 3 def patterns @patterns end |
Instance Method Details
#and(other) ⇒ Object
7 8 9 |
# File 'lib/rx/joins/pattern.rb', line 7 def and(other) Pattern.new(@patterns.concat(other)) end |
#then_do(selector = Proc.new) ⇒ Object
10 11 12 |
# File 'lib/rx/joins/pattern.rb', line 10 def then_do(selector = Proc.new) Plan.new(self, selector) end |