Class: QuakeliveApi::Profile
- Inherits:
-
Object
- Object
- QuakeliveApi::Profile
show all
- Defined in:
- lib/quakelive_api/profile.rb,
lib/quakelive_api/profile/summary.rb,
lib/quakelive_api/profile/statistics.rb,
lib/quakelive_api/profile/awards/base.rb,
lib/quakelive_api/profile/awards/experience.rb,
lib/quakelive_api/profile/awards/mad_skillz.rb,
lib/quakelive_api/profile/awards/social_life.rb,
lib/quakelive_api/profile/awards/sweet_success.rb,
lib/quakelive_api/profile/awards/career_milestones.rb
Defined Under Namespace
Modules: Awards
Classes: Statistics, Summary
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(player_name) ⇒ Profile
Returns a new instance of Profile.
5
6
7
|
# File 'lib/quakelive_api/profile.rb', line 5
def initialize(player_name)
@player_name = player_name
end
|
Instance Attribute Details
#player_name ⇒ Object
Returns the value of attribute player_name.
3
4
5
|
# File 'lib/quakelive_api/profile.rb', line 3
def player_name
@player_name
end
|
Instance Method Details
#awards_experience ⇒ Object
21
22
23
|
# File 'lib/quakelive_api/profile.rb', line 21
def awards_experience
@awards_experience ||= Awards::Experience.new(player_name)
end
|
#awards_milestones ⇒ Object
17
18
19
|
# File 'lib/quakelive_api/profile.rb', line 17
def awards_milestones
@awards_milestones ||= Awards::CareerMilestones.new(player_name)
end
|
#awards_skillz ⇒ Object
25
26
27
|
# File 'lib/quakelive_api/profile.rb', line 25
def awards_skillz
@awards_skillz ||= Awards::MadSkillz.new(player_name)
end
|
#awards_social ⇒ Object
29
30
31
|
# File 'lib/quakelive_api/profile.rb', line 29
def awards_social
@awards_social ||= Awards::SocialLife.new(player_name)
end
|
#awards_success ⇒ Object
33
34
35
|
# File 'lib/quakelive_api/profile.rb', line 33
def awards_success
@awards_success ||= Awards::SweetSuccess.new(player_name)
end
|
#each_award(&block) ⇒ Object
37
38
39
40
41
|
# File 'lib/quakelive_api/profile.rb', line 37
def each_award(&block)
%w(awards_milestones awards_experience awards_skillz awards_social awards_success).each do |awards|
block.call(send(awards))
end
end
|
#statistics ⇒ Object
13
14
15
|
# File 'lib/quakelive_api/profile.rb', line 13
def statistics
@statistics ||= Statistics.new(player_name)
end
|
#summary ⇒ Object
9
10
11
|
# File 'lib/quakelive_api/profile.rb', line 9
def summary
@summary ||= Summary.new(player_name)
end
|