class PackRb::SubCommands
Public Class Methods
new(opts = {})
click to toggle source
# File lib/pack_rb/sub_commands.rb, line 12 def initialize(opts = {}) if opts[:stream_output] STDOUT.sync = true STDERR.sync = true end end
Public Instance Methods
execute(opts)
click to toggle source
Execute a Packer
command via {PackRb::Executor.run_cmd_stream_output}
@param opts [Hash] options passed to the Packer
class
@return [Array] - stdout [String], stderr [String], exit code [Fixnum]
# File lib/pack_rb/sub_commands.rb, line 24 def execute(opts) cmd = opts[:cmd] tpl = opts[:tpl] PackRb::Executor.run_cmd_stream_output("#{cmd} -", tpl) end