Sha256: 8b0a208cabd69ad685e331d3fae2f41fc95ca4f1fd54dc8e2c78f332b4ecc8b6

Contents?: true

Size: 261 Bytes

Versions: 6

Compression:

Stored size: 261 Bytes

Contents

module Vim
  module Flavor
    module ShellUtility
      def sh script
        output = IO.popen(['bash', '-c', script], 'r', &:read)

        if $? == 0
          output
        else
          raise RuntimeError, output
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vim-flavor-4.0.3 lib/vim-flavor/shellutility.rb
vim-flavor-4.0.2 lib/vim-flavor/shellutility.rb
vim-flavor-4.0.1 lib/vim-flavor/shellutility.rb
vim-flavor-4.0.0 lib/vim-flavor/shellutility.rb
vim-flavor-3.0.0 lib/vim-flavor/shellutility.rb
vim-flavor-2.2.2 lib/vim-flavor/shellutility.rb