Class: Mrsk::Commander
- Inherits:
-
Object
- Object
- Mrsk::Commander
- Defined in:
- lib/mrsk/commander.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#config_file ⇒ Object
readonly
Returns the value of attribute config_file.
-
#verbose ⇒ Object
readonly
Returns the value of attribute verbose.
Instance Method Summary collapse
- #app ⇒ Object
- #builder ⇒ Object
-
#initialize(config_file:, verbose: false) ⇒ Commander
constructor
A new instance of Commander.
- #prune ⇒ Object
- #registry ⇒ Object
- #traefik ⇒ Object
- #verbosity(level) ⇒ Object
Constructor Details
#initialize(config_file:, verbose: false) ⇒ Commander
Returns a new instance of Commander.
11 12 13 |
# File 'lib/mrsk/commander.rb', line 11 def initialize(config_file:, verbose: false) @config_file, @verbose = config_file, verbose end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/mrsk/commander.rb', line 9 def config @config end |
#config_file ⇒ Object (readonly)
Returns the value of attribute config_file.
9 10 11 |
# File 'lib/mrsk/commander.rb', line 9 def config_file @config_file end |
#verbose ⇒ Object (readonly)
Returns the value of attribute verbose.
9 10 11 |
# File 'lib/mrsk/commander.rb', line 9 def verbose @verbose end |
Instance Method Details
#app ⇒ Object
20 21 22 |
# File 'lib/mrsk/commander.rb', line 20 def app @app ||= Mrsk::Commands::App.new(config) end |
#builder ⇒ Object
24 25 26 |
# File 'lib/mrsk/commander.rb', line 24 def builder @builder ||= Mrsk::Commands::Builder.new(config) end |
#prune ⇒ Object
36 37 38 |
# File 'lib/mrsk/commander.rb', line 36 def prune @prune ||= Mrsk::Commands::Prune.new(config) end |
#registry ⇒ Object
32 33 34 |
# File 'lib/mrsk/commander.rb', line 32 def registry @registry ||= Mrsk::Commands::Registry.new(config) end |
#traefik ⇒ Object
28 29 30 |
# File 'lib/mrsk/commander.rb', line 28 def traefik @traefik ||= Mrsk::Commands::Traefik.new(config) end |
#verbosity(level) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/mrsk/commander.rb', line 41 def verbosity(level) old_level = SSHKit.config.output_verbosity SSHKit.config.output_verbosity = level yield ensure SSHKit.config.output_verbosity = old_level end |