class LightSide::TrainingTask

Public Instance Methods

process_start() { |parse| ... } click to toggle source
# File lib/lightside/models/training_task.rb, line 11
def process_start
  RestClient.post(process, "", Config.headers) do |response, request, result|
    case response.code
    when 200, 202
      yield JSON.parse(response)
    when 404
      raise ResourceNotFound, "could not find #{name} with ID=#{id}"
    else
      raise JSON.parse(response)["detail"]
    end
  end
end