Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/pry-pipeline/ext.rb

Instance Method Summary collapse

Instance Method Details

#_pipe_(cmd) ⇒ Object Also known as: |



4
5
6
7
8
9
10
11
# File 'lib/pry-pipeline/ext.rb', line 4

def _pipe_(cmd);
  case cmd
  when Proc
    PryPipeline::Response.new(cmd.call self).to_s
  when String
    Pry.run_command("#{cmd} #{self}")
  end
end