Class: PlatformAPI::Stack

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

Overview

Stacks are the different application execution environments available in the Heroku platform.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Stack

Returns a new instance of Stack.



3102
3103
3104
# File 'lib/platform-api/client.rb', line 3102

def initialize(client)
  @client = client
end

Instance Method Details

#info(stack_name_or_stack_id) ⇒ Object

Stack info.

Parameters:

  • stack_name_or_stack_id:

    unique name of stack or unique identifier of stack



3109
3110
3111
# File 'lib/platform-api/client.rb', line 3109

def info(stack_name_or_stack_id)
  @client.stack.info(stack_name_or_stack_id)
end

#listObject

List available stacks.



3114
3115
3116
# File 'lib/platform-api/client.rb', line 3114

def list()
  @client.stack.list()
end

#list_by_app(app_id_or_app_name) ⇒ Object

List available app stacks for an app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



3121
3122
3123
# File 'lib/platform-api/client.rb', line 3121

def list_by_app(app_id_or_app_name)
  @client.stack.list_by_app(app_id_or_app_name)
end