Class: Rangeable::BoundaryIndex::TransitionEvent
- Inherits:
-
Struct
- Object
- Struct
- Rangeable::BoundaryIndex::TransitionEvent
- Defined in:
- lib/rangeable/boundary_index.rb
Overview
Public TransitionEvent type returned by ‘Rangeable#transitions`. `coordinate` is normally an Integer; it is `nil` for close events whose underlying interval ends at the implementation’s +∞ sentinel (i.e. ‘hi` was the maximum representable boundary in the cross-language contract). `kind` is `:open` or `:close`.
Instance Attribute Summary collapse
-
#coordinate ⇒ Object
Returns the value of attribute coordinate.
-
#element ⇒ Object
Returns the value of attribute element.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#ord ⇒ Object
Returns the value of attribute ord.
Instance Method Summary collapse
Instance Attribute Details
#coordinate ⇒ Object
Returns the value of attribute coordinate
29 30 31 |
# File 'lib/rangeable/boundary_index.rb', line 29 def coordinate @coordinate end |
#element ⇒ Object
Returns the value of attribute element
29 30 31 |
# File 'lib/rangeable/boundary_index.rb', line 29 def element @element end |
#kind ⇒ Object
Returns the value of attribute kind
29 30 31 |
# File 'lib/rangeable/boundary_index.rb', line 29 def kind @kind end |
#ord ⇒ Object
Returns the value of attribute ord
29 30 31 |
# File 'lib/rangeable/boundary_index.rb', line 29 def ord @ord end |
Instance Method Details
#close? ⇒ Boolean
34 35 36 |
# File 'lib/rangeable/boundary_index.rb', line 34 def close? kind == :close end |
#open? ⇒ Boolean
30 31 32 |
# File 'lib/rangeable/boundary_index.rb', line 30 def open? kind == :open end |
#to_h ⇒ Object
38 39 40 |
# File 'lib/rangeable/boundary_index.rb', line 38 def to_h { coordinate: coordinate, kind: kind, element: element } end |