Class: Capistrano::Generals::Helpers::ERBNamespace
- Inherits:
-
Object
- Object
- Capistrano::Generals::Helpers::ERBNamespace
- Defined in:
- lib/capistrano/generals/helpers.rb
Overview
Helper class to pass local variables to an ERB template
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(hash) ⇒ ERBNamespace
constructor
A new instance of ERBNamespace.
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_binding ⇒ Object
91 92 93 |
# File 'lib/capistrano/generals/helpers.rb', line 91 def get_binding binding end |