Class: Kampainer::ContactKeys
- Inherits:
-
SchemaCollection
- Object
- SchemaObject
- SchemaCollection
- Kampainer::ContactKeys
- Defined in:
- lib/kampainer/contact.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(keys = []) ⇒ ContactKeys
constructor
A new instance of ContactKeys.
Methods inherited from SchemaObject
Constructor Details
#initialize(keys = []) ⇒ ContactKeys
Returns a new instance of ContactKeys.
52 53 54 55 56 57 58 59 60 61 |
# 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 |