Class: PlayTime::Promote

Inherits:
Object
  • Object
show all
Defined in:
lib/play_time/promote.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Promote

Returns a new instance of Promote.



13
14
15
# File 'lib/play_time/promote.rb', line 13

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



11
12
13
# File 'lib/play_time/promote.rb', line 11

def client
  @client
end

Class Method Details

.promote(track, version_code) ⇒ Object



6
7
8
# File 'lib/play_time/promote.rb', line 6

def promote(track, version_code)
  new(Client.new).promote(track, version_code)
end

Instance Method Details

#promote(track, version_code) ⇒ Object



17
18
19
20
# File 'lib/play_time/promote.rb', line 17

def promote(track, version_code)
  client.authorize!
  client.update(track, version_code)
end