Class: Smite::Ability

Inherits:
Object
  • Object
show all
Defined in:
lib/smite/ability.rb

Instance Attribute Summary

Attributes inherited from Object

#data

Instance Method Summary collapse

Methods inherited from Object

#attributes, #initialize, #method_missing

Constructor Details

This class inherits a constructor from Smite::Object

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Smite::Object

Instance Method Details

#inspectObject



21
22
23
# File 'lib/smite/ability.rb', line 21

def inspect
  "#<Smite::Ability '#{summary}'>"
end

#nameObject



17
18
19
# File 'lib/smite/ability.rb', line 17

def name
  summary
end

#numberObject



13
14
15
# File 'lib/smite/ability.rb', line 13

def number
  ability_number
end

#whichObject



3
4
5
6
7
8
9
10
11
# File 'lib/smite/ability.rb', line 3

def which
  case number
  when 1 then '1st Ability'
  when 2 then '2nd Ability'
  when 3 then '3rd Ability'
  when 4 then 'Ultimate'
  when 5 then 'Passive'
  end
end