lib/etcd/node.rb in etcd-0.2.4 vs lib/etcd/node.rb in etcd-0.3.0
- old
+ new
@@ -17,11 +17,11 @@
@key = opts['key']
@value = opts['value']
@expiration = opts['expiration']
@dir = opts['dir']
- if opts['dir'] && (!!opts['nodes'])
+ if opts['dir'] && opts['nodes']
opts['nodes'].each do |data|
children << Node.new(data)
end
end
end
@@ -37,9 +37,9 @@
fail 'This is not a directory, cant have children'
end
end
def directory?
- !! @dir
+ ! @dir.nil?
end
end
end