Class: Reve::Classes::SkillTree

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

Overview

Holds the result of the Reve::API#skill_tree call. Currently this is not nested based on group_id in each individual skill. Attributes

  • name ( String ) - Name of a Skill

  • type_id ( Fixnum ) - ID of the Skill (Refer to CCP database dump invtypes)

  • group_id ( Fixnum ) - Group ID of the Skill (Refer to CCP database dump invgroups)

  • description ( Skill ) - Description of the Skill

  • rank ( Fixnum ) - Rank of the skill

  • attribs ( [RequiredAttribute] ) - Two-element array with the PrimaryAttribute and SecondaryAttribute for the Skill

  • skills ( [SkillTree] ) - Nested Skills under this group. NOT USED

  • bonuses ( [SkillBonus] ) - Bonuses given by this Skill

See Also: SkillBonus, RequiredAttribute, Reve::API#skill_tree

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, typeid, groupid, desc, rank, attribs = [], skills = [], bonuses = []) ⇒ SkillTree

:nodoc:



1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
# File 'lib/reve/classes.rb', line 1194

def initialize(name, typeid, groupid, desc, rank, attribs = [], skills = [], bonuses = []) #:nodoc:
  @name = name
  @type_id = typeid.to_i
  @group_id = groupid.to_i
  @rank = rank.to_i
  @attribs = attribs
  @required_skills = skills
  @bonuses = bonuses
  # turn multiline literals (embedded \n and lot of white space) into one
  # line!
  @description = desc.split(/\n/).collect { |s| s.strip }.join(' ')
end

Instance Attribute Details

#attribsObject (readonly)

Returns the value of attribute attribs.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def attribs
  @attribs
end

#bonusesObject (readonly)

Returns the value of attribute bonuses.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def bonuses
  @bonuses
end

#descriptionObject (readonly)

Returns the value of attribute description.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def description
  @description
end

#group_idObject (readonly)

Returns the value of attribute group_id.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def group_id
  @group_id
end

#nameObject (readonly)

Returns the value of attribute name.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def name
  @name
end

#rankObject (readonly)

Returns the value of attribute rank.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def rank
  @rank
end

#required_skillsObject (readonly)

Returns the value of attribute required_skills.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def required_skills
  @required_skills
end

#type_idObject (readonly)

Returns the value of attribute type_id.



1193
1194
1195
# File 'lib/reve/classes.rb', line 1193

def type_id
  @type_id
end