Module: OldSchool::HiScores

Defined in:
lib/oldschool/hiscores/hiscores.rb,
lib/oldschool/hiscores/skill.rb,
lib/oldschool/hiscores/minigame.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Minigame, Skill

Constant Summary collapse

MODES =
{
  default: 'https://secure.runescape.com/m=hiscore_oldschool/',
  ironman: 'http://services.runescape.com/m=hiscore_oldschool_ironman/',
  ultimate: 'http://services.runescape.com/m=hiscore_oldschool_ultimate/',
  hardcore: 'http://services.runescape.com/m=hiscore_oldschool_hardcore_ironman/',
  deadman: 'http://services.runescape.com/m=hiscore_oldschool_deadman/',
  seasonal: 'http://services.runescape.com/m=hiscore_oldschool_seasonal/',
  tournament: 'http://services.runescape.com/m=hiscore_oldschool_tournament/'
}.freeze
RESOURCE =
{
  stats: 'index_lite.ws?player='
}.freeze
SKILLS =
%i[
  overall attack defence strength
  hitpoints ranged prayer magic
  cooking woodcutting fletching fishing
  firemaking crafting smithing mining
  herblore agility thieving slayer
  farming runecraft hunter construction
].freeze
MEMBER_SKILLS =
%i[
  fletching herblore agility thieving
  slayer farming hunter construction
].freeze
COMBAT_SKILLS =
%i[
  attack defence strength hitpoints
  ranged prayer magic
].freeze
MINIGAMES =
%i[
  bh_hunter bh_rogue
  clue_all clue_easy clue_medium clue_hard clue_elite clue_master
].freeze
MINIGAMES_SAFE =
%i[
  clue_all clue_easy clue_medium
  clue_hard clue_elite clue_master
].freeze
HUMAN_NAME =
{
  overall: 'Overall',
  attack: 'Attack',
  defence: 'Defence',
  strength: 'Strength',
  hitpoints: 'Hitpoints',
  ranged: 'Ranged',
  prayer: 'Prayer',
  magic: 'Magic',
  cooking: 'Cooking',
  woodcutting: 'Woodcutting',
  fletching: 'Fletching',
  fishing: 'Fishing',
  firemaking: 'Firemaking',
  crafting: 'Crafting',
  smithing: 'Smithing',
  mining: 'Mining',
  herblore: 'Herblore',
  agility: 'Agility',
  thieving: 'Thieving',
  slayer: 'Slayer',
  farming: 'Farming',
  runecraft: 'Runecraft',
  hunter: 'Hunter',
  construction: 'Construction'
}.freeze

Class Method Summary collapse

Class Method Details

.human_name_for(symbol) ⇒ String, "Undefined"

Note:

The symbol must be a valid skill or minigame

Returns:

  • (String)

    the human readable name for a given symbol

  • ("Undefined")

    if the given symbol is invalid



79
80
81
# File 'lib/oldschool/hiscores/hiscores.rb', line 79

def self.human_name_for(symbol)
  HUMAN_NAME[symbol] || 'Undefined'
end