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.
148 149 150 151 152 153 154 155 156 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 148 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.
145 146 147 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 145 def from_line @from_line end |
#nrcpts ⇒ Object
Returns the value of attribute nrcpts.
146 147 148 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 146 def nrcpts @nrcpts end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
144 145 146 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 144 def time @time end |
Instance Method Details
#to_json ⇒ Object
158 159 160 161 162 163 164 |
# File 'lib/fluent/plugin/in_sendmail.rb', line 158 def to_json() return { "time" => @time, "from_line" => @from_line, "nrcpts" => @nrcpts, } end |