Class: IntervalNotation::SymmetricDifferenceCombiner
- Defined in:
- lib/interval_notation/combiners.rb
Instance Attribute Summary collapse
-
#include_last_point ⇒ Object
readonly
checks whether last passed point should be included.
Attributes inherited from Combiner
#num_interval_sets, #previous_state
Instance Method Summary collapse
-
#initialize ⇒ SymmetricDifferenceCombiner
constructor
A new instance of SymmetricDifferenceCombiner.
-
#state ⇒ Object
checks whether current section should be included.
Methods inherited from Combiner
Constructor Details
#initialize ⇒ SymmetricDifferenceCombiner
99 100 101 102 |
# File 'lib/interval_notation/combiners.rb', line 99 def initialize @include_last_point = nil @inside = [false, false] end |
Instance Attribute Details
#include_last_point ⇒ Object (readonly)
checks whether last passed point should be included
97 98 99 |
# File 'lib/interval_notation/combiners.rb', line 97 def include_last_point @include_last_point end |
Instance Method Details
#state ⇒ Object
checks whether current section should be included
105 106 107 |
# File 'lib/interval_notation/combiners.rb', line 105 def state @inside[0] ^ @inside[1] end |