Class: SimpleServerMonitoring::Reporter::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_server_monitoring/reporter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Report

Returns a new instance of Report.



60
61
62
# File 'lib/simple_server_monitoring/reporter.rb', line 60

def initialize(options = {})
  self.subject, self.body, self.status = options.values_at(:subject, :body, :status)
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



58
59
60
# File 'lib/simple_server_monitoring/reporter.rb', line 58

def body
  @body
end

#statusObject

Returns the value of attribute status.



58
59
60
# File 'lib/simple_server_monitoring/reporter.rb', line 58

def status
  @status
end

#subjectObject

Returns the value of attribute subject.



58
59
60
# File 'lib/simple_server_monitoring/reporter.rb', line 58

def subject
  @subject
end

Instance Method Details

#to_sObject



64
65
66
# File 'lib/simple_server_monitoring/reporter.rb', line 64

def to_s
  {status: status, subject: subject, body: body}.to_s
end