Class: Elvarg::Hiscores::Skill

Inherits:
Stats::Skill show all
Defined in:
lib/hiscores/skill.rb

Overview

Represents a Skill on the Hiscores

Instance Attribute Summary collapse

Attributes inherited from Stats::Skill

#icon, #id, #name, #symbol

Instance Method Summary collapse

Methods inherited from Stats::Skill

#combat?, #free?, #member?, #skiller_friendly?

Constructor Details

#initialize(symbol, id = 0, rank = -1,, level = 1, exp = 0) ⇒ Skill

Creates a Hiscores Skill object

Parameters:

  • symbol (Symbol)

    the Symbol of the Skill (required) see Stats::SKILLS for complete list

  • id (Integer) (defaults to: 0)

    the unique id of the Skill (default) 0

  • rank (Integer) (defaults to: -1,)

    the Player’s rank in this Skill (default) -1

  • level (Integer) (defaults to: 1)

    the Player’s level in this Skill (default) 1

  • exp (Integer) (defaults to: 0)

    the Player’s experience in this Skill (default) 0

See Also:



26
27
28
29
30
31
# File 'lib/hiscores/skill.rb', line 26

def initialize(symbol, id = 0, rank = -1, level = 1, exp = 0)
  super(symbol, id)
  @rank = rank
  @level = level
  @exp = exp
end

Instance Attribute Details

#expObject (readonly)

The experience of the Skill the Player has on the Hiscores



13
14
15
# File 'lib/hiscores/skill.rb', line 13

def exp
  @exp
end

#levelObject (readonly)

The level of the Skill the Player has on the Hiscores



11
12
13
# File 'lib/hiscores/skill.rb', line 11

def level
  @level
end

#rankObject (readonly)

The rank of the Skill the Player has on the Hiscores



9
10
11
# File 'lib/hiscores/skill.rb', line 9

def rank
  @rank
end