chrisblutz/cogwheels

View on GitHub
lib/cogwheels.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use __dir__ to get an absolute path to the current file's directory.
Open

$LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + '/../lib')
Severity: Minor
Found in lib/cogwheels.rb by rubocop

This cop checks for places where the #__dir__ method can replace more complex constructs to retrieve a canonicalized absolute path to the current file.

Example:

# bad
path = File.expand_path(File.dirname(__FILE__))

# bad
path = File.dirname(File.realpath(__FILE__))

# good
path = __dir__

There are no issues that match your filters.

Category
Status