lib/retter/stationery/binder.rb in retter-0.0.3 vs lib/retter/stationery/binder.rb in retter-0.0.4

- old
+ new

@@ -10,22 +10,10 @@ def initialize(config) @config = config end - def view_scope - @view_scope ||= View::Scope.new(config, entries: entries) - end - - def layout_renderer - @layout_renderer ||= Haml::Engine.new(layout_file.read, ugly: true) - end - - def entry_renderer - @entry_renderer ||= Haml::Engine.new(entry_layout_file.read, ugly: true) - end - def rebind! commit_wip_file @entries = Retter::Stationery.scan(retters_dir) @@ -115,8 +103,22 @@ end end def entry_url(date, id = nil) (URI.parse(url) + date.strftime('/entries/%Y%m%d.html')).to_s + end + + private + + def view_scope + @view_scope ||= View::Scope.new(config, entries: entries) + end + + def layout_renderer + @layout_renderer ||= Haml::Engine.new(layout_file.read, ugly: true) + end + + def entry_renderer + @entry_renderer ||= Haml::Engine.new(entry_layout_file.read, ugly: true) end end end