Class: ConfCtl::Swpins::ClusterNameList
- Inherits:
-
Array
- Object
- Array
- ConfCtl::Swpins::ClusterNameList
- Defined in:
- lib/confctl/swpins/cluster_name_list.rb
Instance Method Summary collapse
-
#initialize(channels: nil, pattern: '*', machines: nil) ⇒ ClusterNameList
constructor
A new instance of ClusterNameList.
Constructor Details
#initialize(channels: nil, pattern: '*', machines: nil) ⇒ ClusterNameList
Returns a new instance of ClusterNameList.
6 7 8 9 10 11 12 13 |
# File 'lib/confctl/swpins/cluster_name_list.rb', line 6 def initialize(channels: nil, pattern: '*', machines: nil) super() channels ||= ConfCtl::Swpins::ChannelList.get (machines || MachineList.new).each_value do |machine| self << Swpins::ClusterName.new(machine, channels) if Pattern.match?(pattern, machine.name) end end |