Class: Mail::ReceivedElement
- Inherits:
-
Object
- Object
- Mail::ReceivedElement
- Defined in:
- lib/mail/elements/received_element.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#date_time ⇒ Object
readonly
Returns the value of attribute date_time.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
Instance Method Summary collapse
-
#initialize(string) ⇒ ReceivedElement
constructor
A new instance of ReceivedElement.
- #to_s(*args) ⇒ Object
Constructor Details
#initialize(string) ⇒ ReceivedElement
Returns a new instance of ReceivedElement.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mail/elements/received_element.rb', line 11 def initialize(string) if Utilities.blank? string @date_time = nil @info = nil else received = Mail::Parsers::ReceivedParser.parse(string) @date_time = datetime_for(received) @info = received.info end end |
Instance Attribute Details
#date_time ⇒ Object (readonly)
Returns the value of attribute date_time.
9 10 11 |
# File 'lib/mail/elements/received_element.rb', line 9 def date_time @date_time end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
9 10 11 |
# File 'lib/mail/elements/received_element.rb', line 9 def info @info end |
Instance Method Details
#to_s(*args) ⇒ Object
22 23 24 |
# File 'lib/mail/elements/received_element.rb', line 22 def to_s(*args) "#{info}; #{date_time.to_s(*args)}" end |