Class: PlatformAPI::Slug

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

A slug is a snapshot of your application code that is ready to run on the platform.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Slug

Returns a new instance of Slug.



1509
1510
1511
# File 'lib/platform-api/client.rb', line 1509

def initialize(client)
  @client = client
end

Instance Method Details

#create(app_id_or_app_name, body) ⇒ Object

Create a new slug. For more information please refer to Deploying Slugs using the Platform API.

Parameters:

  • unique identifier of app or unique name of app

  • the object to pass as the request payload



1525
1526
1527
# File 'lib/platform-api/client.rb', line 1525

def create(app_id_or_app_name, body)
  @client.slug.create(app_id_or_app_name, body)
end

#info(app_id_or_app_name, slug_id) ⇒ Object

Info for existing slug.

Parameters:

  • unique identifier of app or unique name of app

  • unique identifier of slug



1517
1518
1519
# File 'lib/platform-api/client.rb', line 1517

def info(app_id_or_app_name, slug_id)
  @client.slug.info(app_id_or_app_name, slug_id)
end