Class: CommunicationPreferencesPolicy

Inherits:
Struct
  • Object
show all
Defined in:
app/policies/communication_preferences_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#communication_preferencesObject

Returns the value of attribute communication_preferences

Returns:

  • (Object)

    the current value of communication_preferences



3
4
5
# File 'app/policies/communication_preferences_policy.rb', line 3

def communication_preferences
  @communication_preferences
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



3
4
5
# File 'app/policies/communication_preferences_policy.rb', line 3

def user
  @user
end

Instance Method Details

#access?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'app/policies/communication_preferences_policy.rb', line 4

def access?
  Flipper.enabled?(:communication_preferences, user)
end