Module: Tynn::Render

Defined in:
lib/tynn/render.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.setup(app, options = {}) ⇒ Object

:nodoc:



5
6
7
8
9
10
11
12
13
14
# File 'lib/tynn/render.rb', line 5

def self.setup(app, options = {}) # :nodoc:
  app.settings.update(
    layout: options.fetch(:layout, "layout"),
    views: options.fetch(:views, File.expand_path("views", Dir.pwd)),
    engine: options.fetch(:engine, "erb"),
    engine_opts: {
      escape_html: true
    }.merge!(options.fetch(:options, {}))
  )
end