Class: Rubycritic::Command::StatusReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycritic/commands/status_reporter.rb

Constant Summary collapse

SUCCESS =
0
SCORE_BELOW_MINIMUM =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

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)
  @options = options
  @status = SUCCESS
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/rubycritic/commands/status_reporter.rb', line 4

def status
  @status
end

#status_messageObject (readonly)

Returns the value of attribute status_message.



4
5
6
# File 'lib/rubycritic/commands/status_reporter.rb', line 4

def status_message
  @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