lib/haml_lint/options.rb
def add_file_options(parser)
      parser.on('-c', '--config config-file', String,
                'Specify which configuration file you want to use') do |conf_file|
        @options[:config_file] = conf_file
      end

      parser.on('-e', '--exclude file,...', Array,
                'List of file names to exclude') do |files|
        @options[:excluded_files] = files
      end
    end
# Parses command line options into an options hash.
#
# @param args [Array<String>] arguments passed via the command line
# @return [Hash] parsed options
Parses command line options into an options hash.
Parses command line options into an options hash .
def add_file_options(parser)
      parser.on('-c', '--config config-file', String,
                'Specify which configuration file you want to use') do |conf_file|
        @options[:config_file] = conf_file
      end
      parser.on('-e', '--exclude file,...', Array,
                'List of file names to exclude') do |files|
        @options[:excluded_files] = files
      end
    end
def add_file_options ( parser ) parser . on ( '-c' , '--config config-file' , String , 'Specify which configuration file you want to use' ) do | conf_file | @options [ :config_file ] = conf_file end parser . on ( '-e' , '--exclude file,...' , Array , 'List of file names to exclude' ) do | files | @options [ :excluded_files ] = files end end
Parses command line options into an options hash.
Parses command line options into an options hash .
None
Hash
parser
args
arguments passed via the command line
arguments passed via the command line