Class: PryMoves::AddSuffix

Inherits:
Pry::ClassCommand
  • Object
show all
Defined in:
lib/pry-moves/add_suffix.rb

Direct Known Subclasses

ArgumentCall, ArrayCall, ArrayIndex, HashKey, Method

Instance Method Summary collapse

Instance Method Details

#process(cmd) ⇒ Object



16
17
18
19
20
21
# File 'lib/pry-moves/add_suffix.rb', line 16

def process(cmd)
  last_cmd = Pry.history.to_a[-1]
  cmd = "#{last_cmd}#{wrap_suffix(cmd)}"
  _pry_.pager.page "    > #{cmd}\n"
  _pry_.eval cmd
end