Class: Capistrano::UnicornNginx::Helpers::ERBNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/unicorn_nginx/helpers.rb

Overview

Helper class to pass local variables to an ERB template

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ ERBNamespace

Returns a new instance of ERBNamespace.



46
47
48
49
50
# File 'lib/capistrano/unicorn_nginx/helpers.rb', line 46

def initialize(hash)
  hash.each do |key, value|
    singleton_class.send(:define_method, key) { value }
  end
end

Instance Method Details

#get_bindingObject



52
53
54
# File 'lib/capistrano/unicorn_nginx/helpers.rb', line 52

def get_binding
  binding
end