FitnessKeeper/leeroy

View on GitHub
lib/leeroy/helpers/polling.rb

Summary

Maintainability
A
0 mins
Test Coverage

Unused block argument - x. If it's necessary, use _ or _x as an argument name to indicate that it won't be used. Also consider using a proc without arguments instead of a lambda if you want it to accept any arguments but don't care about them.
Open

      POLL_CALLBACK = lambda {|x| raise 'this is the default callback, did you forget to set the poll_callback attribute?'}
Severity: Minor
Found in lib/leeroy/helpers/polling.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

There are no issues that match your filters.

Category
Status