Class: MHVHealthRecordsPolicy

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

Constant Summary collapse

BB_ACCOUNT_TYPES =
%w[Premium Advanced Basic].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mhv_health_recordsObject

Returns the value of attribute mhv_health_records

Returns:

  • (Object)

    the current value of mhv_health_records



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

def mhv_health_records
  @mhv_health_records
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



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

def user
  @user
end

Instance Method Details

#access?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/policies/mhv_health_records_policy.rb', line 6

def access?
  BB_ACCOUNT_TYPES.include?(user.)
end