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
eac_ruby_utils-0.123.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.121.0 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.120.0 lib/eac_ruby_utils/envs/file.rb
eac_tools-0.76.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_tools-0.76.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_tools-0.75.2 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.119.2 lib/eac_ruby_utils/envs/file.rb
eac_tools-0.75.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_tools-0.75.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.119.1 lib/eac_ruby_utils/envs/file.rb
eac_tools-0.74.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_tools-0.74.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_tools-0.73.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.119.0 lib/eac_ruby_utils/envs/file.rb
eac_tools-0.72.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.118.1 lib/eac_ruby_utils/envs/file.rb
eac_ruby_utils-0.118.0 lib/eac_ruby_utils/envs/file.rb
eac_tools-0.70.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_tools-0.70.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb
eac_tools-0.69.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb