Class: Capistrano::Slnky::Helpers::ERBNamespace

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



44
45
46
47
48
# File 'lib/capistrano/slnky/helpers.rb', line 44

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

Instance Method Details

#get_bindingObject



50
51
52
# File 'lib/capistrano/slnky/helpers.rb', line 50

def get_binding
  binding
end