Class: DDSL::VariableInjector
- Inherits:
-
Object
- Object
- DDSL::VariableInjector
- Defined in:
- lib/ddsl/variable_injector.rb
Constant Summary collapse
- REGEX =
/\$\w+/.freeze
Instance Attribute Summary collapse
-
#var_map ⇒ Object
readonly
Returns the value of attribute var_map.
Instance Method Summary collapse
-
#initialize(var_map) ⇒ VariableInjector
constructor
A new instance of VariableInjector.
- #inject(data) ⇒ Object
Constructor Details
#initialize(var_map) ⇒ VariableInjector
Returns a new instance of VariableInjector.
9 10 11 |
# File 'lib/ddsl/variable_injector.rb', line 9 def initialize(var_map) @var_map = var_map end |
Instance Attribute Details
#var_map ⇒ Object (readonly)
Returns the value of attribute var_map.
7 8 9 |
# File 'lib/ddsl/variable_injector.rb', line 7 def var_map @var_map end |
Instance Method Details
#inject(data) ⇒ Object
13 14 15 |
# File 'lib/ddsl/variable_injector.rb', line 13 def inject(data) traverse_hash(data) end |