lib/haml_lint/options.rb
# 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_info_options(parser)
      parser.on('--show-linters', 'Display available linters') do
        @options[:show_linters] = true
      end
      parser.on_tail('-h', '--help', 'Display help documentation') do
        @options[:help] = parser.help
      end
      parser.on_tail('-v', '--version', 'Display version') do
        @options[:version] = true
      end
    end
def add_info_options ( parser ) parser . on ( '--show-linters' , 'Display available linters' ) do @options [ :show_linters ] = true end parser . on_tail ( '-h' , '--help' , 'Display help documentation' ) do @options [ :help ] = parser . help end parser . on_tail ( '-v' , '--version' , 'Display version' ) do @options [ :version ] = true 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