123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::CLI::Command::ShowDocsUrl Private

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Base
Instance Chain:
self, CopNames, Base
Inherits: RuboCop::CLI::Command::Base
Defined in: lib/rubocop/cli/command/show_docs_url.rb

Overview

Prints out url to documentation of provided cops or documentation base url by default.

Class Attribute Summary

Base - Inherited

Class Method Summary

Base - Inherited

Instance Attribute Summary

Base - Inherited

Instance Method Summary

CopNames - Included

#cop_class_for, #department?, #department_message,
#known_cop_classes

The cops among names that exist, so a command can report on what it understood before #validate_cop_names! objects to the rest.

#unknown_cop_message, #validate_cop_names!

Constructor Details

.new(env) ⇒ ShowDocsUrl

[ GitHub ]

  
# File 'lib/rubocop/cli/command/show_docs_url.rb', line 14

def initialize(env)
  super

  @config = @config_store.for(PathUtil.pwd)
end

Instance Method Details

#cops_array (private)

[ GitHub ]

  
# File 'lib/rubocop/cli/command/show_docs_url.rb', line 40

def cops_array
  @cops_array ||= @options[:show_docs_url]
end

#run

[ GitHub ]

  
# File 'lib/rubocop/cli/command/show_docs_url.rb', line 20

def run
  print_documentation_url
  # Checked after printing, so a typo alongside good names still gives
  # you the urls you asked for.
  validate_cop_names!(cops_array)
end