Class: CHBuild::BindableHash
- Inherits:
-
Object
- Object
- CHBuild::BindableHash
- Defined in:
- lib/chbuild/bindable_hash.rb
Overview
BindableHash is for ERB templates
Instance Method Summary collapse
-
#get_binding ⇒ Object
rubocop:disable Style/AccessorMethodName.
-
#initialize(hash) ⇒ BindableHash
constructor
A new instance of BindableHash.
Constructor Details
#initialize(hash) ⇒ BindableHash
Returns a new instance of BindableHash.
6 7 8 9 10 |
# File 'lib/chbuild/bindable_hash.rb', line 6 def initialize(hash) hash.each do |key, value| singleton_class.send(:define_method, key) { value } end end |
Instance Method Details
#get_binding ⇒ Object
rubocop:disable Style/AccessorMethodName
12 13 14 |
# File 'lib/chbuild/bindable_hash.rb', line 12 def get_binding # rubocop:disable Style/AccessorMethodName binding end |