Class: DiasporaFederation::Entities::Poll

Inherits:
DiasporaFederation::Entity show all
Defined in:
lib/diaspora_federation/entities/poll.rb

Overview

This entity represents a poll and it is federated as an optional part of a status message.

Constant Summary

Constants inherited from DiasporaFederation::Entity

DiasporaFederation::Entity::INVALID_XML_REGEX

Instance Attribute Summary collapse

Method Summary

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

Methods included from Logging

included

Constructor Details

This class inherits a constructor from DiasporaFederation::Entity

Instance Attribute Details

#guidString (readonly)

A random string of at least 16 chars

Returns:

  • (String)

    poll guid

See Also:



11
# File 'lib/diaspora_federation/entities/poll.rb', line 11

property :guid

#poll_answers[Entities::PollAnswer] (readonly)

Array of possible answers for the poll

Returns:



21
# File 'lib/diaspora_federation/entities/poll.rb', line 21

entity :poll_answers, [Entities::PollAnswer]

#questionString (readonly)

Text of the question posed by a user

Returns:

  • (String)

    question



16
# File 'lib/diaspora_federation/entities/poll.rb', line 16

property :question