Class: GameRocket::Action

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gateway, attributes) ⇒ Action

Returns a new instance of Action.



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

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

Instance Attribute Details

#dynPropObject

Returns the value of attribute dynProp.



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

def dynProp
  @dynProp
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#refObject

Returns the value of attribute ref.



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

def ref
  @ref
end

#securedObject

Returns the value of attribute secured.



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

def secured
  @secured
end

Class Method Details

._new(*args) ⇒ Object



22
23
24
# File 'lib/gamerocket/action.rb', line 22

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

.find(id) ⇒ Object



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

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

.run(id, attributes) ⇒ Object



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

def self.run(id, attributes)
  Configuration.gateway.action.run(id, attributes)
end