lib/services/entity.rb in jn_services-1.0.4 vs lib/services/entity.rb in jn_services-1.0.5

- old
+ new

@@ -43,19 +43,20 @@ def _store to_hash.each do |k, v| next if k == 'name' # etcd doesn't like nil v ||= '' - Services.set "#{KEY}/#{path}/#{k}", v + Services.set "#{KEY}/#{path}/#{k}", value: v end end def _load return unless valid_path to_hash.each do |k, v| next if k == 'name' if Services.exists? "#{KEY}/#{path}/#{k}" value = Services.get("#{KEY}/#{path}/#{k}").value + Etcd::Log.debug "Got #{value} from #{KEY}/#{path}/#{k}" instance_variable_set "@#{k}", value end end self end