Class: Arkaan::Campaigns::Invitation
- Inherits:
-
Object
- Object
- Arkaan::Campaigns::Invitation
- 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.
Instance Attribute Summary collapse
-
#account ⇒ Arkaan::Account
The account the invitation has been issued to.
-
#campaign ⇒ Arkaan::Campaign
The campaign the invitation has been made in.
-
#status ⇒ Symbol
The current status of the invitation.
Method Summary
Methods included from Arkaan::Concerns::Historizable
Instance Attribute Details
#account ⇒ Arkaan::Account
Returns the account the invitation has been issued to.
17 |
# File 'lib/arkaan/campaigns/invitation.rb', line 17 belongs_to :account, class_name: 'Arkaan::Account', inverse_of: :invitations |
#campaign ⇒ Arkaan::Campaign
Returns the campaign the invitation has been made in.
20 |
# File 'lib/arkaan/campaigns/invitation.rb', line 20 belongs_to :campaign, class_name: 'Arkaan::Campaign', inverse_of: :invitations |
#status ⇒ Symbol
Returns 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 |