Class: DebtCeiling::Audit
- Inherits:
-
Object
- Object
- DebtCeiling::Audit
- Extended by:
- Forwardable
- Includes:
- CommonMethods
- Defined in:
- lib/debt_ceiling/audit.rb
Constant Summary collapse
- FAILURE_MESSAGE =
"DEBT CEILING FAILURE: "
- TOTAL_LIMIT =
"EXCEEDED TOTAL DEBT CEILING "
- PER_MODULE_MESSAGE =
"MAX DEBT PER MODULE EXCEEDED IN AT LEAST ONE LOCATION"
- MISSED_TARGET_MESSAGE =
"MISSED DEBT REDUCTION TARGET "
Instance Attribute Summary collapse
-
#accounting ⇒ Object
readonly
Returns the value of attribute accounting.
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#loaded ⇒ Object
readonly
Returns the value of attribute loaded.
Instance Method Summary collapse
- #failed_condition? ⇒ Boolean
-
#initialize(dir = '.', opts = {}) ⇒ Audit
constructor
A new instance of Audit.
Methods included from CommonMethods
Constructor Details
#initialize(dir = '.', opts = {}) ⇒ Audit
Returns a new instance of Audit.
19 20 21 22 23 24 25 26 |
# File 'lib/debt_ceiling/audit.rb', line 19 def initialize(dir = '.', opts = {}) @loaded = opts[:preconfigured] @dir = dir @accounting = perform_accounting accounting.print_results unless opts[:skip_report] puts unless opts[:silent] fail_test if failed_condition? && !opts[:warn_only] end |
Instance Attribute Details
#accounting ⇒ Object (readonly)
Returns the value of attribute accounting.
12 13 14 |
# File 'lib/debt_ceiling/audit.rb', line 12 def accounting @accounting end |
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
12 13 14 |
# File 'lib/debt_ceiling/audit.rb', line 12 def dir @dir end |
#loaded ⇒ Object (readonly)
Returns the value of attribute loaded.
12 13 14 |
# File 'lib/debt_ceiling/audit.rb', line 12 def loaded @loaded end |
Instance Method Details
#failed_condition? ⇒ Boolean
28 29 30 |
# File 'lib/debt_ceiling/audit.rb', line 28 def failed_condition? exceeded_total_limit || missed_target || max_debt_per_module_exceeded end |