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