Class: GiantBomb::Game
- Includes:
- Attributes
- Defined in:
- lib/giant_bomb/game.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #get_info! ⇒ Object
-
#initialize(values, client) ⇒ Game
constructor
A new instance of Game.
Methods included from Attributes
Constructor Details
#initialize(values, client) ⇒ Game
Returns a new instance of Game.
19 20 21 22 |
# File 'lib/giant_bomb/game.rb', line 19 def initialize(values, client) @client = client self.attributes = values end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/giant_bomb/game.rb', line 4 def client @client end |
Instance Method Details
#get_info! ⇒ Object
24 25 26 27 28 |
# File 'lib/giant_bomb/game.rb', line 24 def get_info! game = client.get_game_info(self.id) @attributes.merge!(game.attributes) if game @loaded = true end |