Sha256: a38b34efb6ffb0fde147888e3e11102517144a9d8dfa9d0822d70571d515c736

Contents?: true

Size: 397 Bytes

Versions: 1

Compression:

Stored size: 397 Bytes

Contents

require 'shellwords'

module Chaussettes

  # a generic wrapper for sox audio toolchain
  class Tool
    def initialize(command)
      @command = command
      @arguments = []
    end

    def <<(arg)
      @arguments << arg
      self
    end

    def concat(args)
      @arguments.concat(args)
      self
    end

    def to_s
      Shellwords.join([ @command, *@arguments ])
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chaussettes-1.0.0 lib/chaussettes/tool.rb