Class: Playbook

Inherits:
ApplicationRecord show all
Defined in:
app/models/playbook.rb

Overview

The class or playbook that the hunter has provides unique abilities to the Hunter

Schema Information

Table name: playbooks

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationRecord

policy_class

Instance Attribute Details

#backstoryHash

Returns:

  • (Hash)

24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/playbook.rb', line 24

class Playbook < ApplicationRecord
  has_many :improvements, dependent: :destroy
  has_many :gears, dependent: :destroy
  has_many :moves, dependent: :destroy
  has_many :ratings, dependent: :destroy
  validates :name, presence: true

  def to_s
    name
  end
end

#created_atTime

Returns:

  • (Time)

24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/playbook.rb', line 24

class Playbook < ApplicationRecord
  has_many :improvements, dependent: :destroy
  has_many :gears, dependent: :destroy
  has_many :moves, dependent: :destroy
  has_many :ratings, dependent: :destroy
  validates :name, presence: true

  def to_s
    name
  end
end

#descriptionString

Returns:

  • (String)

24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/playbook.rb', line 24

class Playbook < ApplicationRecord
  has_many :improvements, dependent: :destroy
  has_many :gears, dependent: :destroy
  has_many :moves, dependent: :destroy
  has_many :ratings, dependent: :destroy
  validates :name, presence: true

  def to_s
    name
  end
end

#idObject

Returns [].

Returns:


24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/playbook.rb', line 24

class Playbook < ApplicationRecord
  has_many :improvements, dependent: :destroy
  has_many :gears, dependent: :destroy
  has_many :moves, dependent: :destroy
  has_many :ratings, dependent: :destroy
  validates :name, presence: true

  def to_s
    name
  end
end

#luck_effectString

Returns:

  • (String)

24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/playbook.rb', line 24

class Playbook < ApplicationRecord
  has_many :improvements, dependent: :destroy
  has_many :gears, dependent: :destroy
  has_many :moves, dependent: :destroy
  has_many :ratings, dependent: :destroy
  validates :name, presence: true

  def to_s
    name
  end
end

#nameString

Returns:

  • (String)

24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/playbook.rb', line 24

class Playbook < ApplicationRecord
  has_many :improvements, dependent: :destroy
  has_many :gears, dependent: :destroy
  has_many :moves, dependent: :destroy
  has_many :ratings, dependent: :destroy
  validates :name, presence: true

  def to_s
    name
  end
end

#updated_atTime

Returns:

  • (Time)

24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/playbook.rb', line 24

class Playbook < ApplicationRecord
  has_many :improvements, dependent: :destroy
  has_many :gears, dependent: :destroy
  has_many :moves, dependent: :destroy
  has_many :ratings, dependent: :destroy
  validates :name, presence: true

  def to_s
    name
  end
end

Instance Method Details

#to_sObject


31
32
33
# File 'app/models/playbook.rb', line 31

def to_s
  name
end