rokumatsumoto/boyutluseyler

View on GitHub
app/policies/direct_upload_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage

Don't extend an instance initialized by Struct.new. Use a block to customize the struct.
Open

class DirectUploadPolicy < Struct.new(:user, :direct_upload)

This cop checks for inheritance from Struct.new.

Example:

# bad
class Person < Struct.new(:first_name, :last_name)
  def age
    42
  end
end

# good
Person = Struct.new(:first_name, :last_name) do
  def age
    42
  end
end

There are no issues that match your filters.

Category
Status