diff options
author | Wild Kat <wk@users.noreply.github.com> | 2018-09-12 11:23:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 11:23:45 +0200 |
commit | 7c02a230dc970c2946770f6893e35c627b6b1ec0 (patch) | |
tree | d77395371f89aa8efe01d7fa8a194fb3bf9ed58c /lib/oxidized/nodes.rb | |
parent | 58c5310ae1406f1b6d7f1794d8574597c8698138 (diff) |
add a new line after guard clauses for better visual flow (#1520)
Diffstat (limited to 'lib/oxidized/nodes.rb')
-rw-r--r-- | lib/oxidized/nodes.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb index 3e0869a..c0ade54 100644 --- a/lib/oxidized/nodes.rb +++ b/lib/oxidized/nodes.rb @@ -16,6 +16,7 @@ module Oxidized nodes.each do |node| # we want to load specific node(s), not all of them next unless node_want? node_want, node + begin _node = Node.new node new.push _node @@ -32,6 +33,7 @@ module Oxidized def node_want? node_want, node return true unless node_want + node_want_ip = (IPAddr.new(node_want) rescue false) name_is_ip = (IPAddr.new(node[:name]) rescue false) if name_is_ip and node_want_ip == node[:name] @@ -173,6 +175,7 @@ module Oxidized node = find { |n| n.name == node_name } output = node.output.new raise Oxidized::NotSupported unless output.respond_to? :fetch + yield node, output end end |