Sha256: db5b8e1de9daefff7a535efe515d575b709853d5cabe779829e1a0e5c6cc4544

Contents?: true

Size: 786 Bytes

Versions: 2

Compression:

Stored size: 786 Bytes

Contents

module Screenbeacon
  class Test < APIResource
    include Screenbeacon::APIOperations::Create
    include Screenbeacon::APIOperations::Update
    include Screenbeacon::APIOperations::Delete
    include Screenbeacon::APIOperations::List

    def resolve(opts={})
      response, opts = request(:patch, resolve_url, {}, opts)
      refresh_from(response, opts)
    end

    def run(opts={})
      response, opts = request(:patch, run_url, {}, opts)
      refresh_from(response, opts)
    end

    def pause(opts={})
      response, opts = request(:patch, pause_url, {}, opts)
      refresh_from(response, opts)
    end

    private

    def resolve_url
      url + '/resolve'
    end

    def run_url
      url + '/run'
    end

    def pause_url
      url + '/pause'
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
screenbeacon-1.0.2 lib/screenbeacon/test.rb
screenbeacon-1.0.1 lib/screenbeacon/test.rb