Class: Autotuner::Report::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/autotuner/report/base.rb

Constant Summary collapse

DISCLAIMER_MESSAGE =
<<~MSG
  It is always recommended to experiment with these suggestions as some suggestions may not always yield positive performance improvements. The recommended method is to perform A/B testing where a portion of traffic does not have the these suggested values and a portion of traffic with these suggested values.
MSG

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(assist_message) ⇒ Base

Returns a new instance of Base.



12
13
14
# File 'lib/autotuner/report/base.rb', line 12

def initialize(assist_message)
  @assist_message = assist_message
end

Instance Attribute Details

#assist_messageObject (readonly)

Returns the value of attribute assist_message.



10
11
12
# File 'lib/autotuner/report/base.rb', line 10

def assist_message
  @assist_message
end

Instance Method Details

#to_sObject



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/autotuner/report/base.rb', line 16

def to_s
  msg = +assist_message
  msg << "\n"

  m = message
  if m
    msg << m
    msg << "\n"
  end

  msg << DISCLAIMER_MESSAGE
  msg.freeze
end