Class: SecretsCli::Check::Secrets
- Inherits:
-
Object
- Object
- SecretsCli::Check::Secrets
- Includes:
- Helpers
- Defined in:
- lib/secrets_cli/check/secrets.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(action, options) ⇒ Secrets
constructor
A new instance of Secrets.
Methods included from Helpers
#config, #error, #error!, #pastel, #pretty_diff, #print_verbose, #prompt
Constructor Details
#initialize(action, options) ⇒ Secrets
Returns a new instance of Secrets.
9 10 11 12 |
# File 'lib/secrets_cli/check/secrets.rb', line 9 def initialize(action, ) @action = action @options = end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
6 7 8 |
# File 'lib/secrets_cli/check/secrets.rb', line 6 def action @action end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/secrets_cli/check/secrets.rb', line 7 def @options end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 |
# File 'lib/secrets_cli/check/secrets.rb', line 14 def call error! 'Missing .secrets' unless File.exist?('.secrets') error! 'Missing secrets_file' if require_secrets_file? && missing_secret_file? error! 'Missing secrets_storage_key' if missing_secret_storage_key? end |