Class: Stew::Community::ProfileGame
- Inherits:
-
Object
- Object
- Stew::Community::ProfileGame
- Defined in:
- lib/stew/community/profile_game.rb
Overview
Represents a Steam Game owned by a Steam Id
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#hours_last_2_weeks ⇒ Object
readonly
Returns the value of attribute hours_last_2_weeks.
-
#hours_on_record ⇒ Object
readonly
Returns the value of attribute hours_on_record.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#store_link ⇒ Object
readonly
Returns the value of attribute store_link.
Instance Method Summary collapse
-
#initialize(hash) ⇒ ProfileGame
constructor
A new instance of ProfileGame.
Constructor Details
#initialize(hash) ⇒ ProfileGame
Returns a new instance of ProfileGame.
18 19 20 21 22 23 24 25 |
# File 'lib/stew/community/profile_game.rb', line 18 def initialize(hash) @app_id = hash['appID'].to_i @name = hash['name'] @logo = hash['logo'] @store_link = hash['storeLink'] @hours_last_2_weeks = hash['hoursLast2Weeks'].to_f @hours_on_record = hash['hoursOnRecord'].to_f end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
6 7 8 |
# File 'lib/stew/community/profile_game.rb', line 6 def app_id @app_id end |
#hours_last_2_weeks ⇒ Object (readonly)
Returns the value of attribute hours_last_2_weeks.
14 15 16 |
# File 'lib/stew/community/profile_game.rb', line 14 def hours_last_2_weeks @hours_last_2_weeks end |
#hours_on_record ⇒ Object (readonly)
Returns the value of attribute hours_on_record.
16 17 18 |
# File 'lib/stew/community/profile_game.rb', line 16 def hours_on_record @hours_on_record end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
10 11 12 |
# File 'lib/stew/community/profile_game.rb', line 10 def logo @logo end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/stew/community/profile_game.rb', line 8 def name @name end |
#store_link ⇒ Object (readonly)
Returns the value of attribute store_link.
12 13 14 |
# File 'lib/stew/community/profile_game.rb', line 12 def store_link @store_link end |