Method: Corosync::CPG::MemberList#initialize
- Defined in:
- lib/corosync/cpg/member_list.rb
#initialize(*list) ⇒ MemberList
Returns a new instance of MemberList.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/corosync/cpg/member_list.rb', line 15 def initialize(*list) @list = {} list = list[0] if list.size <= 1 if list.is_a?(Array) then list.each do |recipient| self << recipient end elsif list.is_a?(Corosync::CPG::Member) then self << list elsif list.nil? then # nothing else raise ArgumentError, "Invalid recipient type: #{list.class}" end end |