Class: SendmailLog
- Inherits:
-
Object
- Object
- SendmailLog
- Defined in:
- lib/fluent/plugin/in_sendmail.rb
Instance Attribute Summary collapse
-
#from_line ⇒ Object
readonly
Returns the value of attribute from_line.
-
#nrcpts ⇒ Object
Returns the value of attribute nrcpts.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(time, from_line, nrcpts = nil) ⇒ SendmailLog
constructor
A new instance of SendmailLog.
- #to_json ⇒ Object
Constructor Details
#initialize(time, from_line, nrcpts = nil) ⇒ SendmailLog
Returns a new instance of SendmailLog.
147 148 149 150 151 152 153 154 155 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 147 def initialize(time, from_line, nrcpts=nil) @time = time @from_line = from_line if nrcpts == nil @nrcpts = from_line["nrcpts"].to_i else @nrcpts = nrcpts end end |
Instance Attribute Details
#from_line ⇒ Object (readonly)
Returns the value of attribute from_line.
144 145 146 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 144 def from_line @from_line end |
#nrcpts ⇒ Object
Returns the value of attribute nrcpts.
145 146 147 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 145 def nrcpts @nrcpts end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
143 144 145 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 143 def time @time end |
Instance Method Details
#to_json ⇒ Object
157 158 159 160 161 162 163 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 157 def to_json() return { "time" => @time, "from_line" => @from_line, "nrcpts" => @nrcpts, } end |