Module: Support::Path

Defined in:
lib/plugins/pre_commit/support/path.rb

Overview

Responsible for provide relative paths to support files Files located under: /lib/plugin/pre_commit/support/checkstyle*

Class Method Summary collapse

Class Method Details

.relative_to(file) ⇒ String

Return support path relative to a given file

Parameters:

  • file (String)

    file name

Returns:

  • (String)

    formatted path



11
12
13
14
15
16
# File 'lib/plugins/pre_commit/support/path.rb', line 11

def self.relative_to(file)
  File.expand_path(
    "../../../../resources/checkstyle/#{file}",
    __FILE__
  )
end