Class: Smite::GodRank
Instance Attribute Summary
Attributes inherited from Object
#data
Instance Method Summary
collapse
Methods inherited from Object
#attributes, #method_missing
Constructor Details
#initialize(data) ⇒ GodRank
Returns a new instance of GodRank.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Smite::Object
Instance Method Details
24
25
26
|
# File 'lib/smite/god_rank.rb', line 24
def inspect
"#<Smite::GodRank '#{god.name}' Lvl. #{rank} (#{level})>"
end
|
7
8
9
10
11
12
13
14
|
# File 'lib/smite/god_rank.rb', line 7
def level
case rank
when 0 then 'none'
when (1..4) then 'gold'
when (5..9) then 'legendary'
when 10 then 'diamond'
end
end
|
#mastered? ⇒ Boolean
20
21
22
|
# File 'lib/smite/god_rank.rb', line 20
def mastered?
rank > 0
end
|
16
17
18
|
# File 'lib/smite/god_rank.rb', line 16
def mastery
mastered ? 'mastered' : 'unmastered'
end
|