Class: Capistrano::Generals::Helpers::ERBNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/generals/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.



85
86
87
88
89
# File 'lib/capistrano/generals/helpers.rb', line 85

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

Instance Method Details

#get_bindingObject



91
92
93
# File 'lib/capistrano/generals/helpers.rb', line 91

def get_binding
  binding
end