AgileVentures/LocalSupport

View on GitHub
lib/string.rb

Summary

Maintainability
A
0 mins
Test Coverage

Pass &:capitalize as an argument to map instead of a block.
Open

    self.humanize.split(' ').map{|w| w.capitalize}.join(' ')
Severity: Minor
Found in lib/string.rb by rubocop

Use symbols as procs when possible.

Example:

# bad
something.map { |s| s.upcase }

# good
something.map(&:upcase)

%w-literals should be delimited by [ and ]. (https://github.com/bbatsov/ruby-style-guide#percent-literal-braces)
Open

  NOT_WANTED = %w(the of for and in to)
Severity: Minor
Found in lib/string.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

There are no issues that match your filters.

Category
Status