app/policies/identity_provider_policy.rb
Don't extend an instance initialized by Struct.new
. Use a block to customize the struct. Open
Open
class IdentityProviderPolicy < Struct.new(:user, :identity_provider)
- Read upRead up
- Exclude checks
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