class Kampainer::ContactKeys

Public Class Methods

new(keys = []) click to toggle source
# File lib/kampainer/contact.rb, line 52
def initialize(keys = [])
  @collection = keys.map do |key|
    case key
    when Contact::Key then key
    when Integer then Contact::Key.new(id: key)
    when String then Contact::Key.new(unique_identifier: key)
    else Contact::Key.new(key)
    end
  end
end