Class: Arkaan::Campaigns::Invitation

Inherits:
Object
  • Object
show all
Includes:
Arkaan::Concerns::Enumerable, Arkaan::Concerns::Historizable, Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/arkaan/campaigns/invitation.rb

Overview

An invitation is the linked between a player and a campaign. It keeps the history of the interaction between the player and the campaign.

Author:

Instance Attribute Summary collapse

Method Summary

Methods included from Arkaan::Concerns::Historizable

#add_history

Instance Attribute Details

#accountArkaan::Account

Returns the account the invitation has been issued to.

Returns:



17
# File 'lib/arkaan/campaigns/invitation.rb', line 17

belongs_to :account, class_name: 'Arkaan::Account', inverse_of: :invitations

#campaignArkaan::Campaign

Returns the campaign the invitation has been made in.

Returns:



20
# File 'lib/arkaan/campaigns/invitation.rb', line 20

belongs_to :campaign, class_name: 'Arkaan::Campaign', inverse_of: :invitations

#statusSymbol

Returns the current status of the invitation.

Returns:

  • (Symbol)

    the current status of the invitation.



24
25
26
# File 'lib/arkaan/campaigns/invitation.rb', line 24

historize enum_field :status,
%i[pending request accepted refused expelled left master creator],
default: :pending