Sha256: 4739cb77a66f1347bbf48e2b434a479e00c83ad35b787a391ae2900a2b018430

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

module RenderingEngine
  class FileRepo
    attr_reader :base_path

    def initialize(base_path)
      @base_path = base_path
    end

    def read(file_path)
      File.read(full_file_path(file_path))
    end

    def exist?(file_path)
      File.exist?(full_file_path(file_path))
    end

    def file_dirname(file_path)
      File.dirname(file_path)
    end

    private

    def full_file_path(file_path)
      File.join(base_path, file_path)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rendering_engine-0.2.0 lib/rendering_engine/file_repo.rb