Sha256: c7e3e242d5761df4aaffd9c63d38a56f35a928adbafb581e7b7cb7e8f6445206
Contents?: true
Size: 552 Bytes
Versions: 8
Compression:
Stored size: 552 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # Helpers for builtin documentation module Documentation module_function # @api private def department_to_basename(department) "cops_#{department.to_s.downcase.tr('/', '_')}" end # @api private def url_for(cop_class) base = department_to_basename(cop_class.department) fragment = cop_class.cop_name.downcase.gsub(/[^a-z]/, '') "https://docs.rubocop.org/rubocop/#{base}.html##{fragment}" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems