module GitCommander::CommandLoaderOptions
Establishes values to be set by loaders
Public Instance Methods
argument(arg_name, options = {})
click to toggle source
# File lib/git_commander/command_loader_options.rb, line 18 def argument(arg_name, options = {}) add_option :argument, options.merge(name: arg_name) end
description(value = nil)
click to toggle source
# File lib/git_commander/command_loader_options.rb, line 12 def description(value = nil) return @description = value if value @description end
flag(flag_name, options = {})
click to toggle source
# File lib/git_commander/command_loader_options.rb, line 22 def flag(flag_name, options = {}) add_option :flag, options.merge(name: flag_name) end
on_run(&on_run)
click to toggle source
# File lib/git_commander/command_loader_options.rb, line 30 def on_run(&on_run) @block = on_run end
summary(value = nil)
click to toggle source
# File lib/git_commander/command_loader_options.rb, line 6 def summary(value = nil) return @summary = value if value @summary end
switch(switch_name, options = {})
click to toggle source
# File lib/git_commander/command_loader_options.rb, line 26 def switch(switch_name, options = {}) add_option :switch, options.merge(name: switch_name) end