Class: ECSHelper::Command::ExportEnvSecrets
- Defined in:
- lib/ecs_helper/command/export_env_secrets.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Attributes inherited from Base
#client, #helper, #option_parser, #options, #type
Instance Method Summary collapse
Methods inherited from Base
#application, #check_bin, #initialize, #project, #validate
Methods included from Logging
Constructor Details
This class inherits a constructor from ECSHelper::Command::Base
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
4 5 6 |
# File 'lib/ecs_helper/command/export_env_secrets.rb', line 4 def params @params end |
Instance Method Details
#cmd_option_parser ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ecs_helper/command/export_env_secrets.rb', line 6 def cmd_option_parser = { env_vars: [] } parser = ::OptionParser.new do |opts| opts. = "Usage: ecs_helper export_env_secrets" opts.on('-n', '--name=VARIABLE', '') { |o| [:env_vars] << o } end [parser, ] end |
#printable? ⇒ Boolean
21 22 23 |
# File 'lib/ecs_helper/command/export_env_secrets.rb', line 21 def printable? true end |
#required ⇒ Object
17 18 19 |
# File 'lib/ecs_helper/command/export_env_secrets.rb', line 17 def required [] end |
#run ⇒ Object
25 26 27 28 |
# File 'lib/ecs_helper/command/export_env_secrets.rb', line 25 def run return log("No ENV secrets to export. Please pass ENV variables names using -n") if [:env_vars].empty? export_values end |