Sha256: 958bdd6cd854ee69289b37a4cb27e085d448d2f0661581b20922705a2c4cb11b

Contents?: true

Size: 367 Bytes

Versions: 400

Compression:

Stored size: 367 Bytes

Contents

# frozen_string_literal: true

module EacRubyUtils
  module Envs
    class File
      attr_reader :env, :path

      def initialize(env, path)
        @env = env
        @path = path
      end

      def exist?
        env.command('stat', path).execute[:exit_code].zero?
      end

      def read
        env.command('cat', path).execute!
      end
    end
  end
end

Version data entries

400 entries across 400 versions & 4 rubygems

Version Path
ehbrs-tools-0.5.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.27.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.26.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.25.0 lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.3.1 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.24.1 lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.3.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.24.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.23.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.22.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.21.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.20.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.19.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.18.1 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.18.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.17.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.16.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.15.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.14.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.13.0 lib/eac_ruby_utils/envs/file.rb