Module: Runbook::CLIBase
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/runbook/cli_base.rb', line 2 def self.included(base) base.extend(ClassMethods) base. base.class_option( :config, aliases: "-c", type: :string, group: :base, desc: "Path to runbook config file" ) end |
Instance Method Details
#initialize(args = [], local_options = {}, config = {}) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/runbook/cli_base.rb', line 16 def initialize(args = [], = {}, config = {}) super(args, , config) cmd_name = config[:current_command].name _set_cli_config([:config], cmd_name) if [:config] end |