Class: SimpleServerMonitoring::Reporter
- Inherits:
-
Object
- Object
- SimpleServerMonitoring::Reporter
- Defined in:
- lib/simple_server_monitoring/reporter.rb
Defined Under Namespace
Classes: Report
Instance Attribute Summary collapse
-
#report ⇒ Object
readonly
Returns the value of attribute report.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Reporter
constructor
A new instance of Reporter.
- #send_report_email ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Reporter
Returns a new instance of Reporter.
9 10 11 12 |
# File 'lib/simple_server_monitoring/reporter.rb', line 9 def initialize( = {}) @to, @processes_file, @from = .values_at(:to, :processes_file, :from) @report = build_report end |
Instance Attribute Details
#report ⇒ Object (readonly)
Returns the value of attribute report.
7 8 9 |
# File 'lib/simple_server_monitoring/reporter.rb', line 7 def report @report end |
Instance Method Details
#send_report_email ⇒ Object
14 15 16 |
# File 'lib/simple_server_monitoring/reporter.rb', line 14 def send_report_email send_email @to, subject: @report.subject, body: @report.body, content_type: "text/html", from: @from end |