Class: DearInventory::DateTime
- Inherits:
-
Object
- Object
- DearInventory::DateTime
- Extended by:
- T::Sig
- Defined in:
- lib/dear_inventory/lib/date_time.rb
Instance Method Summary collapse
-
#initialize(date) ⇒ DateTime
constructor
A new instance of DateTime.
- #to_s ⇒ Object
Constructor Details
#initialize(date) ⇒ DateTime
Returns a new instance of DateTime.
9 10 11 |
# File 'lib/dear_inventory/lib/date_time.rb', line 9 def initialize(date) @date = T.let(date, T.any(Date, Time)) end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/dear_inventory/lib/date_time.rb', line 14 def to_s @date.strftime("%FT%T") end |