module Ragnarson::Stylecheck::RubocopHelpers
helper to nicely update rubocop config
Public Class Methods
config()
click to toggle source
# File lib/ragnarson/stylecheck/rubocop_helpers.rb, line 8 def config if project_config_exists? project_config_path else stylecheck_config_path end end
project_config_exists?()
click to toggle source
# File lib/ragnarson/stylecheck/rubocop_helpers.rb, line 16 def project_config_exists? File.exist?(project_config_path) end
project_config_path()
click to toggle source
# File lib/ragnarson/stylecheck/rubocop_helpers.rb, line 20 def project_config_path File.join(Dir.pwd, "config", "rubocop.yml") end
stylecheck_config_path()
click to toggle source
# File lib/ragnarson/stylecheck/rubocop_helpers.rb, line 24 def stylecheck_config_path File.join(Ragnarson::Stylecheck.root, "config", "rubocop.yml") end
template_config_path()
click to toggle source
# File lib/ragnarson/stylecheck/rubocop_helpers.rb, line 28 def template_config_path File.join(Ragnarson::Stylecheck.root, "lib", "ragnarson", "templates", "rubocop.yml") end