Class: DDSL::VariableInjector

Inherits:
Object
  • Object
show all
Defined in:
lib/ddsl/variable_injector.rb

Constant Summary collapse

REGEX =
/\$\w+/.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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_mapObject (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