Class: Sai::ANSI::SequencedString::Segment::Location
- Inherits:
-
Object
- Object
- Sai::ANSI::SequencedString::Segment::Location
- Defined in:
- lib/sai/ansi/sequenced_string.rb
Overview
The location of the Sai::ANSI::SequencedString::Segment within a Sai::ANSI::SequencedString
Instance Attribute Summary collapse
-
#end_position ⇒ Integer
(also: #end_pos)
readonly
The ending position of the Location.
-
#start_position ⇒ Integer
(also: #start_pos)
readonly
The starting position of the Location.
Instance Method Summary collapse
-
#initialize(end_position:, start_position:) ⇒ Location
constructor
private
Initialize a new instance of Location.
Constructor Details
#initialize(end_position:, start_position:) ⇒ Location
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a new instance of Location
466 467 468 469 470 |
# File 'lib/sai/ansi/sequenced_string.rb', line 466 def initialize(end_position:, start_position:) @end_position = end_position @start_position = start_position freeze end |
Instance Attribute Details
#end_position ⇒ Integer (readonly) Also known as: end_pos
The ending position of the Location
440 441 442 |
# File 'lib/sai/ansi/sequenced_string.rb', line 440 def end_position @end_position end |
#start_position ⇒ Integer (readonly) Also known as: start_pos
The starting position of the Location
451 452 453 |
# File 'lib/sai/ansi/sequenced_string.rb', line 451 def start_position @start_position end |