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, #find_property_for_xml_name, #missing_props, #optional_props, #property, #resolv_aliases, #xml_names
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
12 |
# File 'lib/diaspora_federation/entities/contact.rb', line 12 property :author, :string |
#blocking ⇒ Boolean (readonly)
Returns if the author is blocking the person.
30 |
# File 'lib/diaspora_federation/entities/contact.rb', line 30 property :blocking, :boolean, optional: true, default: false |
#following ⇒ Boolean (readonly)
Returns if the author is following the person.
22 |
# File 'lib/diaspora_federation/entities/contact.rb', line 22 property :following, :boolean, default: true |
#recipient ⇒ String (readonly)
The diaspora* ID of the person who will be shared with
18 |
# File 'lib/diaspora_federation/entities/contact.rb', line 18 property :recipient, :string |
#sharing ⇒ Boolean (readonly)
Returns if the author is sharing with the person.
26 |
# File 'lib/diaspora_federation/entities/contact.rb', line 26 property :sharing, :boolean, default: true |
Instance Method Details
#to_s ⇒ String
Returns string representation of this object.
33 34 35 |
# File 'lib/diaspora_federation/entities/contact.rb', line 33 def to_s "Contact:#{}:#{recipient}" end |