Class: Docker::Template::Util::Data
- Defined in:
- lib/docker/template/util/data.rb
Overview
Provides a way to encapsulate data for ERB processing so that we don’t get full unfettered access to the entire binding from within our ERB processing context. Nobody wants that.
Instance Method Summary collapse
- #_binding ⇒ Object
-
#initialize(vars) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(vars) ⇒ Data
Returns a new instance of Data.
14 15 16 17 18 |
# File 'lib/docker/template/util/data.rb', line 14 def initialize(vars) vars.each do |key, val| instance_variable_set("@#{key}", val) end end |
Instance Method Details
#_binding ⇒ Object
20 21 22 |
# File 'lib/docker/template/util/data.rb', line 20 def _binding binding end |