class Controlrepo::Node
Attributes
beaker_node[RW]
fact_set[RW]
name[RW]
Public Class Methods
all()
click to toggle source
# File lib/controlrepo/node.rb, line 39 def self.all @@all end
find(node_name)
click to toggle source
# File lib/controlrepo/node.rb, line 26 def self.find(node_name) @@all.each do |node| if node_name.is_a?(Controlrepo::Node) if node = node_name return node end elsif node.name == node_name return node end end nil end
new(name)
click to toggle source
# File lib/controlrepo/node.rb, line 12 def initialize(name) @name = name @beaker_node = nil # If we can't find the factset it will fail, so just catch that error and ignore it begin @fact_set = Controlrepo.facts[(Controlrepo.facts_files.index{|facts_file| File.basename(facts_file,'.json') == name})] rescue TypeError @fact_set = nil end @@all << self end