Class: PlatformAPI::Formation

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

Overview

The formation of processes that should be maintained for an app. Update the formation to scale processes or change dyno sizes. Available process type names and commands are defined by the process_types attribute for the slug currently released on an app.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Formation

Returns a new instance of Formation.



2763
2764
2765
# File 'lib/platform-api/client.rb', line 2763

def initialize(client)
  @client = client
end

Instance Method Details

#batch_update(app_id_or_app_name, body = {}) ⇒ Object



2803
2804
2805
# File 'lib/platform-api/client.rb', line 2803

def batch_update(app_id_or_app_name, body = {})
  @client.formation.batch_update(app_id_or_app_name, body)
end

#info(app_id_or_app_name, formation_id_or_formation_type) ⇒ Object



2777
2778
2779
# File 'lib/platform-api/client.rb', line 2777

def info(app_id_or_app_name, formation_id_or_formation_type)
  @client.formation.info(app_id_or_app_name, formation_id_or_formation_type)
end

#list(app_id_or_app_name) ⇒ Object



2789
2790
2791
# File 'lib/platform-api/client.rb', line 2789

def list(app_id_or_app_name)
  @client.formation.list(app_id_or_app_name)
end

#update(app_id_or_app_name, formation_id_or_formation_type, body = {}) ⇒ Object



2819
2820
2821
# File 'lib/platform-api/client.rb', line 2819

def update(app_id_or_app_name, formation_id_or_formation_type, body = {})
  @client.formation.update(app_id_or_app_name, formation_id_or_formation_type, body)
end