Class: Gem::Commands::LintCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::LintCommand
- Defined in:
- lib/rubygems/commands/lint_command.rb
Instance Method Summary collapse
-
#arguments ⇒ Object
:nodoc:.
-
#description ⇒ Object
:nodoc:.
- #execute ⇒ Object
-
#initialize ⇒ LintCommand
constructor
A new instance of LintCommand.
-
#usage ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ LintCommand
Returns a new instance of LintCommand.
17 18 19 20 21 22 23 |
# File 'lib/rubygems/commands/lint_command.rb', line 17 def initialize super 'lint', description add_option('-d', '--detailed', 'Display detailed output') do |value, opts| [:detailed] = true end end |
Instance Method Details
#arguments ⇒ Object
:nodoc:
9 10 11 |
# File 'lib/rubygems/commands/lint_command.rb', line 9 def arguments # :nodoc: "GEM built gem to check" end |
#description ⇒ Object
:nodoc:
5 6 7 |
# File 'lib/rubygems/commands/lint_command.rb', line 5 def description # :nodoc: 'Check a gem file for common mistakes and errors' end |
#execute ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/rubygems/commands/lint_command.rb', line 25 def execute runner = GemLint::Runner.new(get_one_gem_name) if [:detailed] detailed_output(runner) else simple_output(runner) end end |
#usage ⇒ Object
:nodoc:
13 14 15 |
# File 'lib/rubygems/commands/lint_command.rb', line 13 def usage # :nodoc: "#{program_name} GEM" end |