Class: Stasis::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/stasis/options.rb

Constant Summary collapse

@@template_options =
Hash.new

Class Method Summary collapse

Class Method Details

.get_template_option(type) ⇒ Object

Retrieve template engine options if available. Returns empty hash if no options set.



16
17
18
# File 'lib/stasis/options.rb', line 16

def self.get_template_option(type)
    @@template_options[type] || {}
end

.set_template_option(type, opts = {}) ⇒ Object

Set template engine options.

type: string, template extension, e.g ‘haml’ opts: hash, template options



10
11
12
# File 'lib/stasis/options.rb', line 10

def self.set_template_option(type, opts={})
    @@template_options[type] = opts
end