Module: Terraspace::Cloud::Context

Includes:
Api::Validate
Included in:
Api, Base
Defined in:
lib/terraspace/cloud/context.rb

Instance Method Summary collapse

Methods included from Api::Validate

#validate

Instance Method Details

#setup_context(options) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/terraspace/cloud/context.rb', line 5

def setup_context(options)
  return unless Terraspace.cloud? # else validate of @org errors
  cloud = Terraspace.config.cloud
  @org = cloud.org
  @project = cloud.project
  @stack = options[:stack]
  validate("org", @org)
  validate("project", @project)
end