Class: IntervalNotation::IntersectCombiner

Inherits:
Combiner
  • Object
show all
Defined in:
lib/interval_notation/combiners.rb

Instance Attribute Summary

Attributes inherited from Combiner

#num_interval_sets, #previous_state

Instance Method Summary collapse

Methods inherited from Combiner

#combine, #initialize, #pass

Constructor Details

This class inherits a constructor from IntervalNotation::Combiner

Instance Method Details

#include_last_pointObject

checks whether last passed point should be included



110
111
112
# File 'lib/interval_notation/combiners.rb', line 110

def include_last_point
  @num_interval_sets_covering_last_point == num_interval_sets
end

#stateObject

checks whether current section should be included



105
106
107
# File 'lib/interval_notation/combiners.rb', line 105

def state
  @num_intervals_inside == num_interval_sets
end