Class: Mortar::Local::InstallUtil::BindingClazz
- Inherits:
-
Object
- Object
- Mortar::Local::InstallUtil::BindingClazz
- Defined in:
- lib/mortar/local/installutil.rb
Overview
Allows us to use a hash for template variables
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(attrs) ⇒ BindingClazz
constructor
A new instance of BindingClazz.
Constructor Details
#initialize(attrs) ⇒ BindingClazz
Returns a new instance of BindingClazz.
259 260 261 262 263 264 |
# File 'lib/mortar/local/installutil.rb', line 259 def initialize(attrs) attrs.each{ |k, v| # set an instance variable with the key name so the binding will find it in scope self.instance_variable_set("@#{k}".to_sym, v) } end |
Instance Method Details
#get_binding ⇒ Object
265 266 267 |
# File 'lib/mortar/local/installutil.rb', line 265 def get_binding() binding end |