Class: Pry::Code::CodeRange Private
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a range of lines in a code listing.
Instance Method Summary collapse
- #indices_range(lines) ⇒ Range private
-
#initialize(start_line, end_line = nil) ⇒ CodeRange
constructor
private
A new instance of CodeRange.
Constructor Details
#initialize(start_line, end_line = nil) ⇒ CodeRange
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.
Returns a new instance of CodeRange.
11 12 13 14 15 |
# File 'lib/pry/code/code_range.rb', line 11 def initialize(start_line, end_line = nil) @start_line = start_line @end_line = end_line force_set_end_line end |
Instance Method Details
#indices_range(lines) ⇒ Range
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.
19 20 21 |
# File 'lib/pry/code/code_range.rb', line 19 def indices_range(lines) Range.new(*indices(lines)) end |