Class: Starcraft2::Profile
- Inherits:
-
Object
- Object
- Starcraft2::Profile
- Defined in:
- lib/starcraft2/profile.rb,
lib/starcraft2/profile/match.rb,
lib/starcraft2/profile/stats.rb,
lib/starcraft2/profile/career.rb,
lib/starcraft2/profile/ladder.rb,
lib/starcraft2/profile/points.rb,
lib/starcraft2/profile/season.rb,
lib/starcraft2/profile/ladders.rb,
lib/starcraft2/profile/rewards.rb,
lib/starcraft2/profile/campaign.rb,
lib/starcraft2/profile/non_rank.rb,
lib/starcraft2/profile/swarm_race.rb,
lib/starcraft2/profile/achievements.rb,
lib/starcraft2/profile/swarm_levels.rb,
lib/starcraft2/profile/detailed_season.rb,
lib/starcraft2/profile/achievement_item.rb
Defined Under Namespace
Classes: AchievementItem, Achievements, Campaign, Career, DetailedSeason, Ladder, Ladders, Match, NonRank, Points, Rewards, Season, Stats, SwarmLevels, SwarmRace
Instance Attribute Summary collapse
-
#achievements ⇒ Object
Returns the value of attribute achievements.
-
#campaign ⇒ Object
Returns the value of attribute campaign.
-
#career ⇒ Object
Returns the value of attribute career.
-
#clan_name ⇒ Object
Returns the value of attribute clan_name.
-
#clan_tag ⇒ Object
Returns the value of attribute clan_tag.
-
#client ⇒ Object
Returns the value of attribute client.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#portrait ⇒ Object
Returns the value of attribute portrait.
-
#profile_path ⇒ Object
Returns the value of attribute profile_path.
-
#realm ⇒ Object
Returns the value of attribute realm.
-
#rewards ⇒ Object
Returns the value of attribute rewards.
-
#season ⇒ Object
Returns the value of attribute season.
-
#swarm_levels ⇒ Object
Returns the value of attribute swarm_levels.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Profile
constructor
A new instance of Profile.
- #ladders ⇒ Object
- #matches ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Profile
Returns a new instance of Profile.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/starcraft2/profile.rb', line 6 def initialize( = {}) Utils.load(self, , { :portrait => Icon, :campaign => Campaign, :career => Career, :swarm_levels => SwarmLevels, :season => Season, :rewards => Rewards, :achievements => Achievements }) end |
Instance Attribute Details
#achievements ⇒ Object
Returns the value of attribute achievements.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def achievements @achievements end |
#campaign ⇒ Object
Returns the value of attribute campaign.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def campaign @campaign end |
#career ⇒ Object
Returns the value of attribute career.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def career @career end |
#clan_name ⇒ Object
Returns the value of attribute clan_name.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def clan_name @clan_name end |
#clan_tag ⇒ Object
Returns the value of attribute clan_tag.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def clan_tag @clan_tag end |
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def client @client end |
#display_name ⇒ Object
Returns the value of attribute display_name.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def id @id end |
#portrait ⇒ Object
Returns the value of attribute portrait.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def portrait @portrait end |
#profile_path ⇒ Object
Returns the value of attribute profile_path.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def profile_path @profile_path end |
#realm ⇒ Object
Returns the value of attribute realm.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def realm @realm end |
#rewards ⇒ Object
Returns the value of attribute rewards.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def rewards @rewards end |
#season ⇒ Object
Returns the value of attribute season.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def season @season end |
#swarm_levels ⇒ Object
Returns the value of attribute swarm_levels.
3 4 5 |
# File 'lib/starcraft2/profile.rb', line 3 def swarm_levels @swarm_levels end |
Class Method Details
.build(client, data) ⇒ Object
18 19 20 |
# File 'lib/starcraft2/profile.rb', line 18 def self.build(client, data) new(data.merge!(:client => client)) end |
Instance Method Details
#ladders ⇒ Object
26 27 28 |
# File 'lib/starcraft2/profile.rb', line 26 def ladders client.send(:ladders, {:character_name => self.display_name, :id => self.id, :realm => self.realm}) end |
#matches ⇒ Object
22 23 24 |
# File 'lib/starcraft2/profile.rb', line 22 def matches client.send(:matches, {:character_name => self.display_name, :id => self.id, :realm => self.realm}) end |