Class: DiasporaFederation::Entities::Contact
- Inherits:
-
DiasporaFederation::Entity
- Object
- DiasporaFederation::Entity
- DiasporaFederation::Entities::Contact
- Defined in:
- lib/diaspora_federation/entities/contact.rb
Overview
This entity represents a contact with another person. A user issues it when they start sharing/following with another user.
Constant Summary
Constants inherited from DiasporaFederation::Entity
DiasporaFederation::Entity::ENTITY_NAME_REGEX, DiasporaFederation::Entity::INVALID_XML_REGEX
Instance Attribute Summary collapse
-
#author ⇒ String
readonly
The diaspora* ID of the person who shares their profile.
-
#blocking ⇒ Boolean
readonly
If the author is blocking the person.
-
#following ⇒ Boolean
readonly
If the author is following the person.
-
#recipient ⇒ String
readonly
The diaspora* ID of the person who will be shared with.
-
#sharing ⇒ Boolean
readonly
If the author is sharing with the person.
Instance Method Summary collapse
-
#to_s ⇒ String
String representation of this object.
Methods inherited from DiasporaFederation::Entity
class_name, entity_class, entity_name, from_hash, from_json, from_xml, #initialize, #to_h, #to_json, #to_xml
Methods included from PropertiesDSL
#class_props, #default_values, #entity, #missing_props, #optional_props, #property, #resolv_aliases
Methods included from Logging
Constructor Details
This class inherits a constructor from DiasporaFederation::Entity
Instance Attribute Details
#author ⇒ String (readonly)
The diaspora* ID of the person who shares their profile
14 |
# File 'lib/diaspora_federation/entities/contact.rb', line 14 property :author, :string |
#blocking ⇒ Boolean (readonly)
Returns if the author is blocking the person.
32 |
# File 'lib/diaspora_federation/entities/contact.rb', line 32 property :blocking, :boolean, optional: true, default: false |
#following ⇒ Boolean (readonly)
Returns if the author is following the person.
24 |
# File 'lib/diaspora_federation/entities/contact.rb', line 24 property :following, :boolean, default: true |
#recipient ⇒ String (readonly)
The diaspora* ID of the person who will be shared with
20 |
# File 'lib/diaspora_federation/entities/contact.rb', line 20 property :recipient, :string |
#sharing ⇒ Boolean (readonly)
Returns if the author is sharing with the person.
28 |
# File 'lib/diaspora_federation/entities/contact.rb', line 28 property :sharing, :boolean, default: true |
Instance Method Details
#to_s ⇒ String
Returns string representation of this object.
35 36 37 |
# File 'lib/diaspora_federation/entities/contact.rb', line 35 def to_s "Contact:#{}:#{recipient}" end |