Class: EveOnline::Api::Skill
- Inherits:
-
Object
- Object
- EveOnline::Api::Skill
- Includes:
- Comparable
- Defined in:
- lib/eve_online/api/skill.rb
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #id ⇒ Object
-
#initialize(fragment) ⇒ Skill
constructor
A new instance of Skill.
- #name ⇒ Object
- #to_s(indent = 0) ⇒ Object
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 |
#id ⇒ Object
11 12 13 |
# File 'lib/eve_online/api/skill.rb', line 11 def id fragment['typeID'] end |
#name ⇒ Object
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 |