Class: EveOnline::Api::Skill

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/eve_online/api/skill.rb

Instance Method Summary collapse

Constructor Details

#initialize(fragment) ⇒ Skill

Returns a new instance of Skill.



7
8
9
# File 'lib/eve_online/api/skill.rb', line 7

def initialize fragment
  self.fragment = fragment
end

Instance Method Details

#<=>(other) ⇒ Object



19
20
21
# File 'lib/eve_online/api/skill.rb', line 19

def <=> other
  name <=> other.name
end

#idObject



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

def id
  fragment['typeID']
end

#nameObject



15
16
17
# File 'lib/eve_online/api/skill.rb', line 15

def name
  fragment['typeName']
end

#to_s(indent = 0) ⇒ Object



24
25
26
# File 'lib/eve_online/api/skill.rb', line 24

def to_s indent = 0
  "#{' ' * indent}#{name} Skill (id:#{id})"
end