Class: BuildTool::Commands::Configuration::List
- Defined in:
- lib/build-tool/commands/configuration/list.rb
Overview
BuildCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #applicable? ⇒ Boolean
- #do_execute(args) ⇒ Object
- #initialize_options ⇒ Object
- #show_config_options(only) ⇒ Object
Methods inherited from Standard
#complete_module, #complete_modules, #initialize, #log_directory, #while_logging_to
Methods inherited from Base
#<=>, #cleanup_after_vcs_access, #complete_arguments, #complete_readline, #configuration, #debug, #debug2, #do_complete, #each_option, #error, #execute, #fullname, #info, #initialize, #log?, #quiet, #setup_command, #setup_options, #show_help, #skip_command, #summarize, #teardown_command, #trace, #usage, #verbose, #warn
Methods included from HelpText
#cmdalias, #description, included, #long_description, #name
Constructor Details
This class inherits a constructor from BuildTool::Commands::Standard
Instance Method Details
#applicable? ⇒ Boolean
25 26 27 |
# File 'lib/build-tool/commands/configuration/list.rb', line 25 def applicable? BuildTool::Application.instance.has_recipe? end |
#do_execute(args) ⇒ Object
29 30 31 |
# File 'lib/build-tool/commands/configuration/list.rb', line 29 def do_execute( args ) return ( args ) end |
#initialize_options ⇒ Object
18 19 20 21 22 23 |
# File 'lib/build-tool/commands/configuration/list.rb', line 18 def . = "Usage: #{self.fullname} [OPTIONS]... NAMES..." .separator( "" ) .separator( "Options" ) super end |
#show_config_options(only) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/build-tool/commands/configuration/list.rb', line 33 def ( only ) for option in BuildTool::Setting::export( BuildTool::Application.instance.configuration.settings, only ) verbose( blue( "# #{option[:description].split( "\n" ).join( "\n# " ) }" ) ) info( '%-30s: %s' % [ option[:name], option[:value] ] ) verbose( "" ) end return 0 end |