class OCG::Operator::OR
Public Instance Methods
finished?()
click to toggle source
# File lib/ocg/operator/or.rb, line 34 def finished? @left_generator.finished? && @right_generator.finished? end
last()
click to toggle source
# File lib/ocg/operator/or.rb, line 19 def last left_last = @left_generator.last right_last = @right_generator.last if right_last.nil? left_last else right_last end end
length()
click to toggle source
# File lib/ocg/operator/or.rb, line 38 def length @left_generator.length + @right_generator.length end
next()
click to toggle source
# File lib/ocg/operator/or.rb, line 9 def next return nil if finished? if @left_generator.finished? @right_generator.next else @left_generator.next end end
started?()
click to toggle source
# File lib/ocg/operator/or.rb, line 30 def started? @left_generator.started? || @right_generator.started? end