Class: Mail::DateTimeElement
- Inherits:
-
Object
- Object
- Mail::DateTimeElement
- Defined in:
- lib/mail/elements/date_time_element.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#date_string ⇒ Object
readonly
Returns the value of attribute date_string.
-
#time_string ⇒ Object
readonly
Returns the value of attribute time_string.
Instance Method Summary collapse
-
#initialize(string) ⇒ DateTimeElement
constructor
A new instance of DateTimeElement.
Constructor Details
#initialize(string) ⇒ DateTimeElement
Returns a new instance of DateTimeElement.
9 10 11 12 13 |
# File 'lib/mail/elements/date_time_element.rb', line 9 def initialize(string) date_time = Mail::Parsers::DateTimeParser.parse(string) @date_string = date_time.date_string @time_string = date_time.time_string end |
Instance Attribute Details
#date_string ⇒ Object (readonly)
Returns the value of attribute date_string.
7 8 9 |
# File 'lib/mail/elements/date_time_element.rb', line 7 def date_string @date_string end |
#time_string ⇒ Object (readonly)
Returns the value of attribute time_string.
7 8 9 |
# File 'lib/mail/elements/date_time_element.rb', line 7 def time_string @time_string end |