Class: RuboCop::CLI::Command::ShowDocsUrl Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Base
|
|
Instance Chain:
self,
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
- .new(env) ⇒ ShowDocsUrl constructor Internal use only
Base
- Inherited
Instance Attribute Summary
Instance Method Summary
- #run Internal use only
- #cops_array private Internal use only
- #print_documentation_url private Internal use only
- #registry_hash private Internal use only
Instance Method Details
#cops_array (private)
[ GitHub ]# File 'lib/rubocop/cli/command/show_docs_url.rb', line 38
def cops_array @cops_array ||= @options[:show_docs_url] end
#print_documentation_url (private)
[ GitHub ]# File 'lib/rubocop/cli/command/show_docs_url.rb', line 24
def print_documentation_url puts Cop::Documentation.default_base_url if cops_array.empty? cops_array.each do |cop_name| cop = registry_hash[cop_name] next if cop.empty? url = Cop::Documentation.url_for(cop.first, @config) puts url if url end puts end
#registry_hash (private)
[ GitHub ]#run
[ GitHub ]# File 'lib/rubocop/cli/command/show_docs_url.rb', line 18
def run print_documentation_url end