Class: Kontena::Cli::Models::Platform
- Inherits:
-
Object
- Object
- Kontena::Cli::Models::Platform
show all
- Includes:
- CloudApiModel
- Defined in:
- lib/kontena/cli/models/platform.rb
Instance Attribute Summary
#api_data
Instance Method Summary
collapse
#id, #initialize, #method_missing
Instance Method Details
#online? ⇒ Boolean
11
12
13
|
# File 'lib/kontena/cli/models/platform.rb', line 11
def online?
state.to_s == 'running'.freeze
end
|
#organization ⇒ Object
15
16
17
|
# File 'lib/kontena/cli/models/platform.rb', line 15
def organization
@api_data.dig('relationships', 'organization', 'data', 'id')
end
|
#region ⇒ Object
7
8
9
|
# File 'lib/kontena/cli/models/platform.rb', line 7
def region
@api_data.dig('relationships', 'region', 'data', 'id')
end
|
#to_path ⇒ Object
19
20
21
|
# File 'lib/kontena/cli/models/platform.rb', line 19
def to_path
"#{self.organization}/#{self.name}"
end
|