Class: IntervalNotation::UnionCombiner

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



98
99
100
# File 'lib/interval_notation/combiners.rb', line 98

def include_last_point
  @num_interval_sets_covering_last_point > 0
end

#stateObject

checks whether current section should be included



93
94
95
# File 'lib/interval_notation/combiners.rb', line 93

def state
  @num_intervals_inside > 0
end