Module: Roda::RodaPlugins::Papercraft

Defined in:
lib/roda/plugins/papercraft.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.configure(app, opts = {}) ⇒ Object

Set the file to load the routes metadata from. Options:

:file

The JSON file containing the routes metadata (default: ‘routes.json’)



11
12
13
14
15
16
17
# File 'lib/roda/plugins/papercraft.rb', line 11

def self.configure(app, opts = {})
  template_root = opts[:template_root] || File.join(FileUtils.pwd, "templates")

  app.instance_exec do
    @template_root ||= template_root
  end
end