Class: Core::Models::Campaigns::Token
- Inherits:
-
Object
- Object
- Core::Models::Campaigns::Token
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/core/models/campaigns/token.rb
Overview
A token represents an player or a monster in the game. It can be placed as a TokenPosition.
Instance Attribute Summary collapse
-
#campaign ⇒ Core::Models::Campaign
The campaign in which this token can be used.
-
#creator ⇒ Core::Models::Account
The account of the player creating the token.
-
#name ⇒ String
The name of the token that will be displayed on the map.
Instance Attribute Details
#campaign ⇒ Core::Models::Campaign
Returns the campaign in which this token can be used.
20 |
# File 'lib/core/models/campaigns/token.rb', line 20 :campaign, class_name: 'Core::Models::Campaign', inverse_of: :tokens |
#creator ⇒ Core::Models::Account
Returns the account of the player creating the token.
23 |
# File 'lib/core/models/campaigns/token.rb', line 23 belongs_to :creator, class_name: 'Core::Models::Account', inverse_of: :tokens |
#name ⇒ String
Returns the name of the token that will be displayed on the map.
16 |
# File 'lib/core/models/campaigns/token.rb', line 16 field :name, type: String |