Class: Addressbook::Contact::Nested

Inherits:
Resource
  • Object
show all
Defined in:
lib/addressbook/contact.rb

Direct Known Subclasses

Address, Email, Phone

Instance Method Summary collapse

Methods inherited from Resource

headers

Constructor Details

#initialize(attributes = {}, persisted = false) ⇒ Nested

Returns a new instance of Nested.



65
66
67
# File 'lib/addressbook/contact.rb', line 65

def initialize(attributes={}, persisted=false)
  @attributes = attributes.present? ? attributes.stringify_keys : default_attributes
end