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:



1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
# File 'lib/reve/classes.rb', line 1170

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.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def attribs
  @attribs
end

#bonusesObject (readonly)

Returns the value of attribute bonuses.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def bonuses
  @bonuses
end

#descriptionObject (readonly)

Returns the value of attribute description.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def description
  @description
end

#group_idObject (readonly)

Returns the value of attribute group_id.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def group_id
  @group_id
end

#nameObject (readonly)

Returns the value of attribute name.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def name
  @name
end

#rankObject (readonly)

Returns the value of attribute rank.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def rank
  @rank
end

#required_skillsObject (readonly)

Returns the value of attribute required_skills.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def required_skills
  @required_skills
end

#type_idObject (readonly)

Returns the value of attribute type_id.



1169
1170
1171
# File 'lib/reve/classes.rb', line 1169

def type_id
  @type_id
end