Class: SecretsCli::Vault::Base
- Inherits:
-
Object
- Object
- SecretsCli::Vault::Base
- Includes:
- Helpers
- Defined in:
- lib/secrets_cli/vault/base.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ Base
constructor
A new instance of Base.
Methods included from Helpers
#config, #error!, #pastel, #print_verbose, #prompt
Constructor Details
#initialize(options) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/secrets_cli/vault/base.rb', line 8 def initialize() = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/secrets_cli/vault/base.rb', line 6 def end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/secrets_cli/vault/base.rb', line 12 def call print_verbose(command) if config.verbose Open3.popen2e(command) do |_stdin, stdout_and_stderr, wait_thr| if wait_thr.value.success? prompt.ok(stdout_and_stderr.read) else error!(stdout_and_stderr.read) end end end |