Class: DateTimeAttribute::Container
- Inherits:
-
Struct
- Object
- Struct
- DateTimeAttribute::Container
- Defined in:
- lib/date_time_attribute/container.rb
Instance Attribute Summary collapse
- #date ⇒ Date, String
-
#date_time ⇒ Object
Returns the value of attribute date_time.
- #time ⇒ Time, String
- #time_zone ⇒ String?
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#date ⇒ Date, String
42 43 44 |
# File 'lib/date_time_attribute/container.rb', line 42 def date @date end |
#date_time ⇒ Object
Returns the value of attribute date_time
6 7 8 |
# File 'lib/date_time_attribute/container.rb', line 6 def date_time @date_time end |
#time ⇒ Time, String
47 48 49 |
# File 'lib/date_time_attribute/container.rb', line 47 def time @time end |
#time_zone ⇒ String?
18 19 20 |
# File 'lib/date_time_attribute/container.rb', line 18 def time_zone @time_zone end |
Class Method Details
.parser ⇒ Object
51 52 53 |
# File 'lib/date_time_attribute/container.rb', line 51 def self.parser @parser || Time.zone || Time end |
.parser=(val) ⇒ Object
56 57 58 |
# File 'lib/date_time_attribute/container.rb', line 56 def self.parser=(val) @parser = val end |
Instance Method Details
#in_time_zone(time_zone) ⇒ Container
Returns self.
11 12 13 14 15 |
# File 'lib/date_time_attribute/container.rb', line 11 def in_time_zone(time_zone) self.time_zone = time_zone update_date_time self end |