Class: Rangeable::BoundaryIndex::Segment

Inherits:
Struct
  • Object
show all
Defined in:
lib/rangeable/boundary_index.rb

Overview

Sentinel: callers may pass ‘Integer.MAX` semantics by passing the special value below as `hi`. We default to no upper bound so close coords are always `hi + 1` finite Integer except when the caller explicitly opts into the +∞ sentinel via `Rangeable::INT_MAX`.

Ruby has unbounded Integer, so this sentinel only matters for cross-language byte-identical fixtures that need to round-trip Swift’s ‘Int.max` boundary (Test #23.A).

Instance Attribute Summary collapse

Instance Attribute Details

#activeObject

Returns the value of attribute active

Returns:

  • (Object)

    the current value of active



52
53
54
# File 'lib/rangeable/boundary_index.rb', line 52

def active
  @active
end

#hiObject

Returns the value of attribute hi

Returns:

  • (Object)

    the current value of hi



52
53
54
# File 'lib/rangeable/boundary_index.rb', line 52

def hi
  @hi
end

#loObject

Returns the value of attribute lo

Returns:

  • (Object)

    the current value of lo



52
53
54
# File 'lib/rangeable/boundary_index.rb', line 52

def lo
  @lo
end