Class: Loom::Shell::CmdPipeline

Inherits:
Object
  • Object
show all
Defined in:
lib/loom/shell/cmd_wrapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(piped_cmds) ⇒ CmdPipeline

Returns a new instance of CmdPipeline.



152
153
154
# File 'lib/loom/shell/cmd_wrapper.rb', line 152

def initialize(piped_cmds)
  @piped_cmds = piped_cmds
end

Instance Method Details

#to_sObject



156
157
158
159
160
161
162
163
164
# File 'lib/loom/shell/cmd_wrapper.rb', line 156

def to_s
  @piped_cmds.map do |cmd|
    if cmd.respond_to? :escape_cmd
      cmd.escape_cmd
    else
      cmd
    end
  end.join " | "
end