Class: Arkaan::Phone

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

Overview

A phone number is given by a user so that the persons he has selected can have it to contact him.

Author:

Instance Attribute Summary collapse

Instance Attribute Details

#accountArkaan::Account

Returns the account the phone number is associated to.

Returns:



18
# File 'lib/arkaan/phone.rb', line 18

embedded_in :account, class_name: 'Arkaan::Account', inverse_of: :phones

#numberInteger

Returns the phone number the user has given.

Returns:

  • (Integer)

    the phone number the user has given.



14
# File 'lib/arkaan/phone.rb', line 14

field :number, type: String

#privacySymbol

Returns the level of privacy you want for this phone number.

Returns:

  • (Symbol)

    the level of privacy you want for this phone number.



11
# File 'lib/arkaan/phone.rb', line 11

enum_field :privacy, [:players, :public, :private], default: :private