Class: Stew::Community::ProfileGame

Inherits:
Object
  • Object
show all
Defined in:
lib/stew/community/profile_game.rb

Overview

Represents a Steam Game owned by a Steam Id

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject (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_weeksObject (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_recordObject (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

#logoObject (readonly)

Returns the value of attribute logo.



10
11
12
# File 'lib/stew/community/profile_game.rb', line 10

def 
  @logo
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/stew/community/profile_game.rb', line 8

def name
  @name
end

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