Class: S3crets::Cli
- Inherits:
-
Thor
- Object
- Thor
- S3crets::Cli
- Includes:
- Thor::Actions
- Defined in:
- lib/s3crets/cli.rb
Overview
The ‘s3crets` binay/thor application main class
Instance Attribute Summary collapse
-
#ui ⇒ Object
Returns the value of attribute ui.
Instance Method Summary collapse
- #bundle ⇒ Object (also: #plunder, #install)
- #get(key) ⇒ Object
- #init ⇒ Object
-
#initialize ⇒ Cli
constructor
A new instance of Cli.
- #update ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Cli
Returns a new instance of Cli.
16 17 18 19 20 21 22 23 24 |
# File 'lib/s3crets/cli.rb', line 16 def initialize(*) super the_shell = (['no-color'] ? Thor::Shell::Basic.new : shell) @ui = Shell.new(the_shell) @ui.be_quiet! if ['quiet'] @ui.debug! if ['verbose'] debug_header end |
Instance Attribute Details
#ui ⇒ Object
Returns the value of attribute ui.
14 15 16 |
# File 'lib/s3crets/cli.rb', line 14 def ui @ui end |
Instance Method Details
#bundle ⇒ Object Also known as: plunder, install
47 48 49 |
# File 'lib/s3crets/cli.rb', line 47 def bundle run_action { bundle! } end |
#get(key) ⇒ Object
72 73 74 |
# File 'lib/s3crets/cli.rb', line 72 def get(key) run_action { get! key } end |
#init ⇒ Object
41 42 43 |
# File 'lib/s3crets/cli.rb', line 41 def init run_action { init! } end |
#update ⇒ Object
60 61 62 |
# File 'lib/s3crets/cli.rb', line 60 def update run_action { update! } end |
#version ⇒ Object
27 28 29 |
# File 'lib/s3crets/cli.rb', line 27 def version say "#{APPLICATION_NAME} Version: #{VERSION}" end |