| Class | Pry::Command::CodeCollector |
| In: |
lib/pry/commands/code_collector.rb
|
| Parent: | Object |
| _pry_ | [R] | |
| args | [R] | |
| file | [RW] | The name of the explicitly given file (if any). |
| input_expression_ranges | [RW] | |
| opts | [R] | |
| output_result_ranges | [RW] |
The content (i.e code/docs) for the selected object. If the user provided a bare code object, it returns the source. If the user provided the `-i` or `-o` switches, it returns the selected input/output lines joined as a string. If the user used `-d CODE_OBJECT` it returns the docs for that code object.
@return [String]
Given a string and a range, return the `range` lines of that string.
@param [String] content @param [Range, Fixnum] range @return [String] The string restricted to the given range