Class: RxRuby::Pattern

Inherits:
Object
  • Object
show all
Defined in:
lib/rx_ruby/joins/pattern.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(patterns) ⇒ Pattern

Returns a new instance of Pattern.



4
5
6
# File 'lib/rx_ruby/joins/pattern.rb', line 4

def initialize(patterns)
  @patterns = patterns
end

Instance Attribute Details

#patternsObject (readonly)

Returns the value of attribute patterns.



3
4
5
# File 'lib/rx_ruby/joins/pattern.rb', line 3

def patterns
  @patterns
end

Instance Method Details

#and(other) ⇒ Object



7
8
9
# File 'lib/rx_ruby/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_ruby/joins/pattern.rb', line 10

def then_do(selector = Proc.new)
  Plan.new(self, selector)
end