Class: MHVMessagingPolicy
- Inherits:
-
Struct
- Object
- Struct
- MHVMessagingPolicy
- Defined in:
- app/policies/mhv_messaging_policy.rb
Constant Summary collapse
- SM_ACCOUNT_TYPES =
%w[Premium].freeze
Instance Attribute Summary collapse
-
#mhv_messaging ⇒ Object
Returns the value of attribute mhv_messaging.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#mhv_messaging ⇒ Object
Returns the value of attribute mhv_messaging
3 4 5 |
# File 'app/policies/mhv_messaging_policy.rb', line 3 def mhv_messaging @mhv_messaging end |
#user ⇒ Object
Returns the value of attribute user
3 4 5 |
# File 'app/policies/mhv_messaging_policy.rb', line 3 def user @user end |
Instance Method Details
#access? ⇒ Boolean
6 7 8 |
# File 'app/policies/mhv_messaging_policy.rb', line 6 def access? SM_ACCOUNT_TYPES.include?(user.mhv_account_type) && user.va_patient? end |