Sha256: 053c7bb3ecd8719ef73095160463df63936482375af61f3af9b491ec15af9249

Contents?: true

Size: 306 Bytes

Versions: 1

Compression:

Stored size: 306 Bytes

Contents

# -*- coding: utf-8 -*-

class String
  def _pipe_(cmd);
    case cmd
    when Proc
      (cmd.call self.to_s).to_s
    when String
      Pry.run_command("#{cmd} #{self}")
    end
  end
  alias_method :|, :_pipe_
end

class Symbol
  def _pipe_(*args); to_s._pipe_(*args) end
  alias_method :|, :_pipe_
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pry-pipeline-0.0.3 lib/pry-pipeline/ext.rb