class RenderingEngine::FileRepo

Attributes

base_path[R]

Public Class Methods

new(base_path) click to toggle source
# File lib/rendering_engine/file_repo.rb, line 5
def initialize(base_path)
  @base_path = base_path
end

Public Instance Methods

exist?(file_path) click to toggle source
# File lib/rendering_engine/file_repo.rb, line 13
def exist?(file_path)
  File.exist?(full_file_path(file_path))
end
file_dirname(file_path) click to toggle source
# File lib/rendering_engine/file_repo.rb, line 17
def file_dirname(file_path)
  File.dirname(file_path)
end
read(file_path) click to toggle source
# File lib/rendering_engine/file_repo.rb, line 9
def read(file_path)
  File.read(full_file_path(file_path))
end

Private Instance Methods

full_file_path(file_path) click to toggle source
# File lib/rendering_engine/file_repo.rb, line 23
def full_file_path(file_path)
  File.join(base_path, file_path)
end