Class: GameRocket::Game
- Inherits:
-
Object
- Object
- GameRocket::Game
- Defined in:
- lib/gamerocket/game.rb
Instance Attribute Summary collapse
-
#dynProp ⇒ Object
Returns the value of attribute dynProp.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gateway, attributes) ⇒ Game
constructor
A new instance of Game.
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
#dynProp ⇒ Object
Returns the value of attribute dynProp.
4 5 6 |
# File 'lib/gamerocket/game.rb', line 4 def dynProp @dynProp end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/gamerocket/game.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/gamerocket/game.rb', line 4 def name @name end |
#status ⇒ Object
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 |