Skip to content

Commit 6162cc9

Browse files
committed
Fix nodes accessor
1 parent b545c53 commit 6162cc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: lib/octofacts/backends/index.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def select(conditions)
4545
add_fact_to_index(key) unless indexed_fact?(key)
4646
matching_nodes = index[key][value.to_s]
4747
raise Octofacts::Errors::NoFactsError if matching_nodes.nil?
48-
self.nodes = nodes & matching_nodes
48+
@nodes = nodes & matching_nodes
4949
end
5050

5151
self
@@ -62,7 +62,7 @@ def reject(conditions)
6262
end
6363
end
6464

65-
self.nodes = matching_nodes
65+
@nodes = matching_nodes
6666
self
6767
end
6868

@@ -72,7 +72,7 @@ def prefer(conditions)
7272
add_fact_to_index(key) unless indexed_fact?(key)
7373
matching_nodes = index[key][value.to_s]
7474
unless matching_nodes.nil?
75-
self.nodes = (matching_nodes.to_set + nodes.to_set).to_a
75+
@nodes = (matching_nodes.to_set + nodes.to_set).to_a
7676
end
7777
end
7878

0 commit comments

Comments
 (0)