Method: Hocon::Impl::ConfigNodeObject#set_value_on_path_node

Defined in:
lib/hocon/impl/config_node_object.rb

#set_value_on_path_node(desired_path, value, flavor) ⇒ Object



115
116
117
118
119
120
121
122
123
# File 'lib/hocon/impl/config_node_object.rb', line 115

def set_value_on_path_node(desired_path, value, flavor)
  node = change_value_on_path(desired_path.value, value, flavor)

  # If the desired Path did not exist, add it
  unless node.has_value(desired_path.value)
    return node.add_value_on_path(desired_path, value, flavor)
  end
  node
end