Method: Brochure::Application#initialize

Defined in:
lib/brochure/application.rb

#initialize(root, options = {}) ⇒ Application

Returns a new instance of Application.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/brochure/application.rb', line 5

def initialize(root, options = {})
  @app_root      = File.expand_path(root)
  @template_root = File.join(@app_root, "templates")
  @asset_root    = File.join(@app_root, "public")
  @plugin_root   = File.join(@app_root, "vendor", "plugins")

  @assigns = options[:assigns] || {}
  @template_options = options[:template_options] || {}
  helpers.push(*options[:helpers]) if options[:helpers]
  initialize_plugins
end