Class: Metacritic::Game

Inherits:
Object
  • Object
show all
Defined in:
lib/metacritic/Game.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Game

Returns a new instance of Game.



7
8
9
# File 'lib/metacritic/Game.rb', line 7

def initialize(response)
  @response = response.body["result"]
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



5
6
7
# File 'lib/metacritic/Game.rb', line 5

def response
  @response
end

Instance Method Details

#developerObject



39
40
41
# File 'lib/metacritic/Game.rb', line 39

def developer
  @response["developer"]
end

#genreObject



23
24
25
# File 'lib/metacritic/Game.rb', line 23

def genre
  @response["genre"]
end

#nameObject



11
12
13
# File 'lib/metacritic/Game.rb', line 11

def name
  @response["name"]
end

#platformObject



31
32
33
# File 'lib/metacritic/Game.rb', line 31

def platform
  @response["platform"]
end

#publisherObject



35
36
37
# File 'lib/metacritic/Game.rb', line 35

def publisher
  @response["publisher"]
end

#ratingObject



27
28
29
# File 'lib/metacritic/Game.rb', line 27

def rating
  @response["rating"]
end

#rlsdateObject



19
20
21
# File 'lib/metacritic/Game.rb', line 19

def rlsdate
  @response["rlsdate"]
end

#scoreObject



15
16
17
# File 'lib/metacritic/Game.rb', line 15

def score
  @response["score"].to_i
end

#urlObject



43
44
45
# File 'lib/metacritic/Game.rb', line 43

def url
  @response["url"]
end