Module: Beaker::Options::SubcommandOptionsParser
- Defined in:
 - lib/beaker/options/subcommand_options_file_parser.rb
 
Overview
A set of functions to read options files
Class Method Summary collapse
- .parse_options_file(options_file_path) ⇒ Object
 - 
  
    
      .parse_subcommand_options(argv, options_file)  ⇒ OptionsHash, Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Returns an empty OptionHash or loads subcommand options yaml from disk.
 
Class Method Details
.parse_options_file(options_file_path) ⇒ Object
      5 6 7 8 9  | 
    
      # File 'lib/beaker/options/subcommand_options_file_parser.rb', line 5 def self.() result = OptionsHash.new result = YAML.load_file() if File.exist?() result end  | 
  
.parse_subcommand_options(argv, options_file) ⇒ OptionsHash, Hash
Returns an empty OptionHash or loads subcommand options yaml from disk
      13 14 15 16 17 18 19 20 21  | 
    
      # File 'lib/beaker/options/subcommand_options_file_parser.rb', line 13 def self.(argv, ) result = OptionsHash.new if Beaker::Subcommands::SubcommandUtil.execute_subcommand?(argv[0]) return result if argv[0] == 'init' result = SubcommandOptionsParser.() end result end  |