Class: Vendor::Template::Locals

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/template.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Locals

Returns a new instance of Locals.



9
10
11
12
13
14
15
16
17
18
# File 'lib/vendor/template.rb', line 9

def initialize(options)
  # Create methods for each of the options
  (class << self; self; end).class_eval do
    options.each_pair do |key, value|
      define_method key.to_sym do
        value
      end
    end
  end
end

Instance Method Details

#get_bindingObject



20
21
22
# File 'lib/vendor/template.rb', line 20

def get_binding
  return binding()
end