Sha256: 28d55694d666a4e9fffbdc67b29531f9fc7333b92639ce1927ea6da84a4c145a

Contents?: true

Size: 520 Bytes

Versions: 11

Compression:

Stored size: 520 Bytes

Contents

module PolishGeeks
  module DevTools
    # Class wrapping shell commands executing
    class Shell
      # Executes a given command in a system shell and returns its output
      # @param [String] command that should be executed
      # @return [String] executed command output
      # @example Run 'ls' command and assing the output
      #   ls = PolishGeeks::DevTools::Shell.new.execute('ls')
      #   print ls #=> 'app app.rb Capfile ...'
      def execute(command)
        `#{command}`
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
polishgeeks-dev-tools-1.4.0 lib/polish_geeks/dev_tools/shell.rb
polishgeeks-dev-tools-1.3.2 lib/polish_geeks/dev_tools/shell.rb
polishgeeks-dev-tools-1.3.1 lib/polish_geeks/dev_tools/shell.rb
polishgeeks-dev-tools-1.3.0 lib/polish_geeks/dev_tools/shell.rb
polishgeeks-dev-tools-1.2.1 lib/polishgeeks/dev-tools/shell.rb
polishgeeks-dev-tools-1.2.0 lib/polishgeeks/dev-tools/shell.rb
polishgeeks-dev-tools-1.1.3 lib/polishgeeks/dev-tools/shell.rb
polishgeeks-dev-tools-1.1.2 lib/polishgeeks/dev-tools/shell.rb
polishgeeks-dev-tools-1.1.1 lib/polishgeeks/dev-tools/shell.rb
polishgeeks-dev-tools-1.1.0 lib/polishgeeks/dev-tools/shell.rb
polishgeeks-dev-tools-1.0.0 lib/polishgeeks/dev-tools/shell.rb