ManageIQ/net_app_manageability

View on GitHub
lib/net_app_manageability/nam_array.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
50%

Use yield instead of block.call.
Open

        block.arity < 1 ? self.instance_eval(&block) : block.call(self)

This cop identifies the use of a &block parameter and block.call where yield would do just as well.

Example:

# bad
def method(&block)
  block.call
end
def another(&func)
  func.call 1, 2, 3
end

# good
def method
  yield
end
def another
  yield 1, 2, 3
end

There are no issues that match your filters.

Category
Status