Class: GameRocket::Game

Inherits:
Object
  • Object
show all
Defined in:
lib/gamerocket/game.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gateway, attributes) ⇒ Game

Returns a new instance of Game.



6
7
8
9
10
11
12
# File 'lib/gamerocket/game.rb', line 6

def initialize(gateway, attributes)
  @gateway = gateway
  if !attributes.nil?
    set_instance_variables_from_hash(attributes)
    self.dynProp = attributes[:dynProp].is_a?(Hash) ? attributes[:dynProp] : {}
  end
end

Instance Attribute Details

#dynPropObject

Returns the value of attribute dynProp.



4
5
6
# File 'lib/gamerocket/game.rb', line 4

def dynProp
  @dynProp
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/gamerocket/game.rb', line 4

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/gamerocket/game.rb', line 4

def name
  @name
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/gamerocket/game.rb', line 4

def status
  @status
end

Class Method Details

._new(*args) ⇒ Object



18
19
20
# File 'lib/gamerocket/game.rb', line 18

def self._new(*args)
  self.new *args
end

.find(id) ⇒ Object



14
15
16
# File 'lib/gamerocket/game.rb', line 14

def self.find(id)
  Configuration.gateway.game.find(id)
end