Class: Pry::History
- Inherits:
-
Object
- Object
- Pry::History
- Defined in:
- lib/yadriggy/source_code.rb
Overview
Log.
Instance Method Summary collapse
-
#push(line) ⇒ Object
(also: #<<)
Records a line.
Instance Method Details
#push(line) ⇒ Object Also known as: <<
Records a line.
We modify the original Pry::History::push
to record a duplicated line as well.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/yadriggy/source_code.rb', line 13 def push(line) unless line.empty? || line.include?("\0") @pusher.call(line) @history << line if !should_ignore?(line) && Pry.config.history.should_save @saver.call(line) end end line end |