Class: DebtCeiling::Audit
- Inherits:
-
Object
- Object
- DebtCeiling::Audit
- Extended by:
- Forwardable
- Includes:
- CommonMethods
- Defined in:
- lib/debt_ceiling/audit.rb
Constant Summary collapse
- CONFIG_FILE_NAME =
".debt_ceiling.rb"- CONFIG_LOCATIONS =
["#{Dir.pwd}/#{CONFIG_FILE_NAME}", "#{Dir.home}/#{CONFIG_FILE_NAME}"]
- FAILURE_MESSAGE =
"DEBT CEILING FAILURE: "- TOTAL_LIMIT =
"EXCEEDED TOTAL DEBT CEILING "- NO_CONFIG_FOUND =
"No #{CONFIG_FILE_NAME} configuration file detected in #{Dir.pwd} or ~/, using defaults"- 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
-
#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.
22 23 24 25 26 27 28 29 |
# File 'lib/debt_ceiling/audit.rb', line 22 def initialize(dir = '.', opts = {}) @loaded = opts[:preconfigured] @dir = dir @accounting = perform_accounting accounting.print_results unless opts[:skip_report] puts fail_test if failed_condition? && !opts[:warn_only] end |
Instance Attribute Details
#accounting ⇒ Object (readonly)
Returns the value of attribute accounting.
15 16 17 |
# File 'lib/debt_ceiling/audit.rb', line 15 def accounting @accounting end |
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
15 16 17 |
# File 'lib/debt_ceiling/audit.rb', line 15 def dir @dir end |
#loaded ⇒ Object (readonly)
Returns the value of attribute loaded.
15 16 17 |
# File 'lib/debt_ceiling/audit.rb', line 15 def loaded @loaded end |