Class: NgxLint::CommandLine

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/ngxlint/command_line.rb

Overview

Command line parsing.

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CommandLine

A new NgxLint::Command



9
10
11
# File 'lib/ngxlint/command_line.rb', line 9

def initialize(*args)
	super(*args)
end

Instance Method Details

#executeObject

Execute this command.



14
15
16
# File 'lib/ngxlint/command_line.rb', line 14

def execute
	version if version?	# --version
end

#versionString

The version string.

Returns:

  • (String)

    Current installed version.



21
22
23
# File 'lib/ngxlint/command_line.rb', line 21

def version
	puts "ngxlint #{NgxLint::VERSION}"
end