Class: DiasporaFederation::Entities::Comment

Inherits:
DiasporaFederation::Entity show all
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

LEGACY_SIGNATURE_ORDER =
Deprecated.

Old signature order

%i(guid parent_guid text author).freeze
PARENT_TYPE =
"Post".freeze

Constants included from Relayable

Relayable::DIGEST

Constants inherited from DiasporaFederation::Entity

DiasporaFederation::Entity::INVALID_XML_REGEX

Instance Attribute Summary collapse

Attributes included from Relayable

#additional_xml_elements, #author, #author_signature, #guid, #parent, #parent_author_signature, #parent_guid, #xml_order

Method Summary

Methods included from Relayable

included, #initialize, #sender_valid?, #to_s, #verify_signatures

Methods included from Logging

included

Methods inherited from DiasporaFederation::Entity

entity_class, entity_name, from_xml, #initialize, #to_h, #to_s, #to_xml

Methods included from PropertiesDSL

#class_props, #default_values, #entity, #find_property_for_xml_name, #missing_props, #property, #resolv_aliases, #xml_names

Instance Attribute Details

#created_atTime (readonly)

Comment entity creation time

Returns:

  • (Time)

    creation time



23
# File 'lib/diaspora_federation/entities/comment.rb', line 23

property :created_at, default: -> { Time.now.utc }

#textString (readonly)

Returns the comment text.

Returns:

  • (String)

    the comment text



18
# File 'lib/diaspora_federation/entities/comment.rb', line 18

property :text