Class: CemAcpt::Platform::Gcp::Project
- Inherits:
-
Object
- Object
- CemAcpt::Platform::Gcp::Project
- Includes:
- Helper
- Defined in:
- lib/cem_acpt/platform/gcp/compute.rb
Overview
This class represents a GCP project
Instance Method Summary collapse
- #cmd_flag ⇒ Object
-
#initialize(name: nil, zone: nil) ⇒ Project
constructor
A new instance of Project.
- #name ⇒ Object
- #zone ⇒ Object
Methods included from Helper
#add_cmd, #cmd, #cmd_flag_vars?
Constructor Details
#initialize(name: nil, zone: nil) ⇒ Project
Returns a new instance of Project.
25 26 27 28 |
# File 'lib/cem_acpt/platform/gcp/compute.rb', line 25 def initialize(name: nil, zone: nil) @name = name @zone = zone end |
Instance Method Details
#cmd_flag ⇒ Object
38 39 40 |
# File 'lib/cem_acpt/platform/gcp/compute.rb', line 38 def cmd_flag "--project=#{name}" end |
#name ⇒ Object
30 31 32 |
# File 'lib/cem_acpt/platform/gcp/compute.rb', line 30 def name @name ||= cmd.project_from_config end |
#zone ⇒ Object
34 35 36 |
# File 'lib/cem_acpt/platform/gcp/compute.rb', line 34 def zone @zone ||= cmd.zone_from_config end |