Class: DiasporaFederation::Entities::Comment
- Inherits:
-
DiasporaFederation::Entity
- Object
- DiasporaFederation::Entity
- DiasporaFederation::Entities::Comment
- Includes:
- Relayable
- Defined in:
- lib/diaspora_federation/entities/comment.rb
Overview
This entity represents a comment to some kind of post (e.g. status message).
Constant Summary collapse
- PARENT_TYPE =
The DiasporaFederation::Entities::Comment parent is a Post
"Post"
Constants included from Signable
Constants inherited from DiasporaFederation::Entity
DiasporaFederation::Entity::ENTITY_NAME_REGEX, DiasporaFederation::Entity::INVALID_XML_REGEX
Instance Attribute Summary collapse
-
#created_at ⇒ Time
readonly
Comment entity creation time.
-
#edited_at ⇒ Time
readonly
The timestamp when the comment was edited.
-
#text ⇒ String
readonly
The comment text.
Attributes included from Relayable
#additional_data, #author, #author_signature, #guid, #parent, #parent_guid
Method Summary
Methods included from Relayable
included, #initialize, #sender_valid?, #signature_order, #to_json, #to_s, #verify_signature
Methods included from Signable
#sign_with_key, #signature_data, #verify_signature
Methods included from Logging
Methods inherited from DiasporaFederation::Entity
class_name, entity_class, entity_name, from_hash, from_json, from_xml, #initialize, #to_h, #to_json, #to_s, #to_xml
Methods included from PropertiesDSL
#class_props, #default_values, #entity, #missing_props, #optional_props, #property, #resolv_aliases
Instance Attribute Details
#created_at ⇒ Time (readonly)
Comment entity creation time
21 |
# File 'lib/diaspora_federation/entities/comment.rb', line 21 property :created_at, :timestamp, default: -> { Time.now.utc } |
#edited_at ⇒ Time (readonly)
The timestamp when the comment was edited
26 |
# File 'lib/diaspora_federation/entities/comment.rb', line 26 property :edited_at, :timestamp, optional: true |
#text ⇒ String (readonly)
Returns the comment text.
16 |
# File 'lib/diaspora_federation/entities/comment.rb', line 16 property :text, :string |