Class: DiasporaFederation::Entities::Message
- Inherits:
-
DiasporaFederation::Entity
- Object
- DiasporaFederation::Entity
- DiasporaFederation::Entities::Message
- Defined in:
- lib/diaspora_federation/entities/message.rb
Overview
This entity represents a private message exchanged in private conversation.
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 author.
-
#conversation_guid ⇒ String
readonly
Guid of a conversation this message belongs to.
-
#created_at ⇒ Time
readonly
Message creation time.
-
#edited_at ⇒ Time
readonly
The timestamp when the message was edited.
-
#guid ⇒ String
readonly
A random string of at least 16 chars.
-
#text ⇒ String
readonly
Text of the message composed by a user.
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 author
13 |
# File 'lib/diaspora_federation/entities/message.rb', line 13 property :author, :string |
#conversation_guid ⇒ String (readonly)
Guid of a conversation this message belongs to
40 |
# File 'lib/diaspora_federation/entities/message.rb', line 40 property :conversation_guid, :string |
#created_at ⇒ Time (readonly)
Message creation time
29 |
# File 'lib/diaspora_federation/entities/message.rb', line 29 property :created_at, :timestamp, default: -> { Time.now.utc } |
#edited_at ⇒ Time (readonly)
The timestamp when the message was edited
34 |
# File 'lib/diaspora_federation/entities/message.rb', line 34 property :edited_at, :timestamp, optional: true |
#guid ⇒ String (readonly)
A random string of at least 16 chars
19 |
# File 'lib/diaspora_federation/entities/message.rb', line 19 property :guid, :string |
#text ⇒ String (readonly)
Text of the message composed by a user
24 |
# File 'lib/diaspora_federation/entities/message.rb', line 24 property :text, :string |
Instance Method Details
#to_s ⇒ String
Returns string representation of this object.
43 44 45 |
# File 'lib/diaspora_federation/entities/message.rb', line 43 def to_s "#{super}:#{conversation_guid}" end |