Class: Rubycritic::Command::StatusReporter
- Inherits:
-
Object
- Object
- Rubycritic::Command::StatusReporter
- Defined in:
- lib/rubycritic/commands/status_reporter.rb
Constant Summary collapse
- SUCCESS =
0
- SCORE_BELOW_MINIMUM =
1
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_message ⇒ Object
readonly
Returns the value of attribute status_message.
Instance Method Summary collapse
-
#initialize(options) ⇒ StatusReporter
constructor
A new instance of StatusReporter.
- #score=(score) ⇒ Object
Constructor Details
#initialize(options) ⇒ StatusReporter
Returns a new instance of StatusReporter.
8 9 10 11 |
# File 'lib/rubycritic/commands/status_reporter.rb', line 8 def initialize() @options = @status = SUCCESS end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/rubycritic/commands/status_reporter.rb', line 4 def status @status end |
#status_message ⇒ Object (readonly)
Returns the value of attribute status_message.
4 5 6 |
# File 'lib/rubycritic/commands/status_reporter.rb', line 4 def @status_message end |
Instance Method Details
#score=(score) ⇒ Object
13 14 15 16 |
# File 'lib/rubycritic/commands/status_reporter.rb', line 13 def score=(score) @score = score.round(2) update_status end |