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
Returns a new instance of SymmetricDifferenceCombiner.
145 146 147 148 |
# File 'lib/interval_notation/combiners.rb', line 145 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
143 144 145 |
# File 'lib/interval_notation/combiners.rb', line 143 def include_last_point @include_last_point end |
Instance Method Details
#state ⇒ Object
checks whether current section should be included
151 152 153 |
# File 'lib/interval_notation/combiners.rb', line 151 def state @inside[0] ^ @inside[1] end |