Class: ReplCode::CodeRange Private
- Inherits:
-
Object
- Object
- ReplCode::CodeRange
- Defined in:
- lib/puppet-repl/code/code_range.rb
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.
10 11 12 13 14 |
# File 'lib/puppet-repl/code/code_range.rb', line 10 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.
18 19 20 |
# File 'lib/puppet-repl/code/code_range.rb', line 18 def indices_range(lines) Range.new(*indices(lines)) end |