lib/rendering_engine/provider.rb in rendering_engine-0.1.1 vs lib/rendering_engine/provider.rb in rendering_engine-0.2.0

- old
+ new

@@ -1,18 +1,17 @@ module RenderingEngine class Provider - def initialize(base_path, base_opts={}) - @base_path = base_path + def initialize(file_repo, base_opts = {}) + @file_repo = file_repo @base_opts = base_opts end - def get(relative_path, opts={}) - file_path = File.join(base_path, relative_path) + def get(file_path, opts = {}) content_opts = base_opts.merge(opts) - Content.new(file_path, content_opts) + Content.new(file_repo, file_path, content_opts) end private - attr_reader :base_path, :base_opts + attr_reader :file_repo, :base_opts end end