Class: RakeCheck::Checker::Base
- Inherits:
-
Object
- Object
- RakeCheck::Checker::Base
- Includes:
- Term::ANSIColor
- Defined in:
- lib/rake_check/checker/base.rb
Overview
Abstractclass for all Checker
Direct Known Subclasses
Brakeman, BundlerAudit, Cane, CoffeeLint, Cucumber, Konacha, Rbp, Reek, Rspec, Yard
Instance Attribute Summary collapse
-
#check_output ⇒ Object
readonly
Returns the value of attribute check_output.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#short_message ⇒ Object
readonly
Returns the value of attribute short_message.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #status ⇒ Object
- #success? ⇒ Boolean
-
#type ⇒ Object
overwrite if needed.
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
13 14 15 |
# File 'lib/rake_check/checker/base.rb', line 13 def initialize( = {}) @options = end |
Instance Attribute Details
#check_output ⇒ Object (readonly)
Returns the value of attribute check_output.
12 13 14 |
# File 'lib/rake_check/checker/base.rb', line 12 def check_output @check_output end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
12 13 14 |
# File 'lib/rake_check/checker/base.rb', line 12 def @options end |
#short_message ⇒ Object (readonly)
Returns the value of attribute short_message.
12 13 14 |
# File 'lib/rake_check/checker/base.rb', line 12 def @short_message end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
12 13 14 |
# File 'lib/rake_check/checker/base.rb', line 12 def time @time end |
Instance Method Details
#status ⇒ Object
17 18 19 |
# File 'lib/rake_check/checker/base.rb', line 17 def status "(#{@time} sec): " + (success? ? "OK".green : "FAILED".red) + " " + .to_s end |
#success? ⇒ Boolean
21 22 23 |
# File 'lib/rake_check/checker/base.rb', line 21 def success? @status && @status.success? end |
#type ⇒ Object
overwrite if needed
26 27 28 |
# File 'lib/rake_check/checker/base.rb', line 26 def type self.class.name.split("::").last end |