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
avm-tools-0.52.0 vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
avm-tools-0.51.0 vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.36.1 lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.12.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.11.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.36.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.35.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.34.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.33.1 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.33.0 lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.10.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.32.1 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.32.0 lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.9.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.31.0 lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.7.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.30.0 lib/eac_ruby_utils/envs/file.rb
ehbrs-tools-0.6.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.29.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.28.0 lib/eac_ruby_utils/envs/file.rb