Class: PlayTime::Runner

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

Defined Under Namespace

Classes: ResponseError

Class Method Summary collapse

Class Method Details

.run!(client, options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/play_time/runner.rb', line 6

def run!(client, options = {})
  response = client.execute(options)

  if response.data && (error = response.data['error'])
    raise ResponseError, error
  else
    response
  end
end