lib/onebox/layout.rb in onebox-1.5.19 vs lib/onebox/layout.rb in onebox-1.5.20
- old
+ new
@@ -1,7 +1,11 @@
+require_relative "template_support"
+
module Onebox
class Layout < Mustache
+ include TemplateSupport
+
VERSION = "1.0.0"
attr_reader :cache
attr_reader :record
attr_reader :view
@@ -31,16 +35,9 @@
def uri
@uri = URI(link)
end
- def load_paths
- Onebox.options.load_paths.select(&method(:template?))
- end
-
- def template?(path)
- File.exist?(File.join(path, "#{template_name}.#{template_extension}"))
- end
def checksum
@md5.hexdigest("#{VERSION}:#{link}")
end