Class: Rack::TemplateVars

Inherits:
Object
  • Object
show all
Defined in:
lib/rack-denyie.rb

Overview

Binds the options as template variables (NOTE: This is probably a better way of doing this, I just don’t know it.)

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ TemplateVars

Returns a new instance of TemplateVars.



87
88
89
90
91
# File 'lib/rack-denyie.rb', line 87

def initialize(options = {})
  options.each_pair do |key, value|
    self.instance_variable_set("@#{key}", value)
  end
end

Instance Method Details

#get_bindingObject



93
94
95
# File 'lib/rack-denyie.rb', line 93

def get_binding
  binding
end