lib/rendering_engine/provider.rb in rendering_engine-0.0.1 vs lib/rendering_engine/provider.rb in rendering_engine-0.1.0

- old
+ new

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