Class: Export::ContactSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/export/contact_serializer.rb

Instance Method Summary collapse

Instance Method Details

#account_idObject


24
25
26
# File 'app/serializers/export/contact_serializer.rb', line 24

def 
  object.person_diaspora_handle
end

#contact_groups_membershipObject


28
29
30
# File 'app/serializers/export/contact_serializer.rb', line 28

def contact_groups_membership
  object.aspects.map(&:name)
end

#followedObject


20
21
22
# File 'app/serializers/export/contact_serializer.rb', line 20

def followed
  object.receiving
end

#followingObject


16
17
18
# File 'app/serializers/export/contact_serializer.rb', line 16

def following
  object.sharing
end

#public_keyObject


32
33
34
# File 'app/serializers/export/contact_serializer.rb', line 32

def public_key
  object.person.serialized_public_key
end