Class: MebPolicy
- Inherits:
-
Struct
- Object
- Struct
- MebPolicy
- Defined in:
- app/policies/meb_policy.rb
Instance Attribute Summary collapse
-
#my_education_benefits ⇒ Object
Returns the value of attribute my_education_benefits.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#my_education_benefits ⇒ Object
Returns the value of attribute my_education_benefits
3 4 5 |
# File 'app/policies/meb_policy.rb', line 3 def my_education_benefits @my_education_benefits end |
#user ⇒ Object
Returns the value of attribute user
3 4 5 |
# File 'app/policies/meb_policy.rb', line 3 def user @user end |
Instance Method Details
#access? ⇒ Boolean
4 5 6 7 8 |
# File 'app/policies/meb_policy.rb', line 4 def access? accessible = user.icn.present? && user.ssn.present? && user.loa3? increment_statsd(accessible) accessible end |
#increment_statsd(accessible) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/policies/meb_policy.rb', line 10 def increment_statsd(accessible) if accessible StatsD.increment('api.my_education_benefits.policy.success') else StatsD.increment('api.my_education_benefits.policy.failure') end end |