Sha256: c980e4f6813de01cb81f027c4a4333ba7d799dc69f8411b650cfaa89440ea44d

Contents?: true

Size: 435 Bytes

Versions: 9

Compression:

Stored size: 435 Bytes

Contents

require 'delegate'
require 'shellwords'

module Aruba
  module Platforms
    # This is a command which should be run
    class UnixCommandString < SimpleDelegator
      def initialize(cmd)
        __setobj__ cmd
      end

      def to_a
        Shellwords.split __getobj__
      end

      if RUBY_VERSION < '1.9'
        def to_s
          __getobj__.to_s
        end
        alias_method :inspect, :to_s
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aruba-0.11.0.pre lib/aruba/platforms/unix_command_string.rb
aruba-0.10.2 lib/aruba/platforms/unix_command_string.rb
aruba-0.10.1 lib/aruba/platforms/unix_command_string.rb
aruba-0.10.0 lib/aruba/platforms/unix_command_string.rb
aruba-0.10.0.pre2 lib/aruba/platforms/unix_command_string.rb
aruba-0.10.0.pre lib/aruba/platforms/unix_command_string.rb
aruba-0.9.0 lib/aruba/platforms/unix_command_string.rb
aruba-0.9.0.pre2 lib/aruba/platforms/unix_command_string.rb
aruba-0.9.0.pre lib/aruba/platforms/unix_command_string.rb