Class: Core::Models::Campaigns::Token

Inherits:
Object
  • Object
show all
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.

Author:

Instance Attribute Summary collapse

Instance Attribute Details

#campaignCore::Models::Campaign

Returns the campaign in which this token can be used.

Returns:



20
# File 'lib/core/models/campaigns/token.rb', line 20

embedded_in :campaign, class_name: 'Core::Models::Campaign', inverse_of: :tokens

#creatorCore::Models::Account

Returns the account of the player creating the token.

Returns:



23
# File 'lib/core/models/campaigns/token.rb', line 23

belongs_to :creator, class_name: 'Core::Models::Account', inverse_of: :tokens

#nameString

Returns the name of the token that will be displayed on the map.

Returns:

  • (String)

    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