Sha256: 717f382458ae0fa6ab7048583aa5aebc947472b0d46e904d10dcde89164f2f83

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

module ConfCtl
  class Swpins::ClusterNameList < Array
    # @param channels [Swpins::ChannelList]
    # @param pattern [String]
    # @param machines [MachineList]
    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
confctl-2.0.0 lib/confctl/swpins/cluster_name_list.rb
confctl-1.0.0 lib/confctl/swpins/cluster_name_list.rb