class OCG::Operator::Abstract
OCG::Operator::Abstract
class.
Constants
- VARIABLES_TO_COPY
Public Class Methods
new(left_generator_or_options, right_generator_or_options)
click to toggle source
Initializes operator using left_generator_or_options
and right_generator_or_options
. Internaly object initializes left and right generators.
# File lib/ocg/operator/abstract.rb, line 14 def initialize(left_generator_or_options, right_generator_or_options) # rubocop:disable Lint/MissingSuper @left_generator = OCG.prepare_generator left_generator_or_options @right_generator = OCG.prepare_generator right_generator_or_options reset end
Public Instance Methods
finished?()
click to toggle source
# File lib/ocg/operator/abstract.rb, line 53 def finished? raise NotImplementedError, "\"finished?\" is not implemented" end
last()
click to toggle source
# File lib/ocg/operator/abstract.rb, line 45 def last raise NotImplementedError, "\"last\" is not implemented" end
length()
click to toggle source
# File lib/ocg/operator/abstract.rb, line 57 def length raise NotImplementedError, "\"length\" is not implemented" end
next()
click to toggle source
:nocov:
# File lib/ocg/operator/abstract.rb, line 41 def next raise NotImplementedError, "\"next\" is not implemented" end
reset()
click to toggle source
Resets left and right generators specifically for options.
# File lib/ocg/operator/abstract.rb, line 22 def reset @left_generator.reset @right_generator.reset nil end
started?()
click to toggle source
# File lib/ocg/operator/abstract.rb, line 49 def started? raise NotImplementedError, "\"started?\" is not implemented" end
Protected Instance Methods
merge_results(left, right)
click to toggle source
Merges results specifically for options.
# File lib/ocg/operator/abstract.rb, line 30 def merge_results(left, right) if left.nil? right elsif right.nil? left else left.merge right end end