Sha256: 906267afbb78fa418b233952aebc7efb5c8a4fe7340753486b5673c13f1ea101

Contents?: true

Size: 324 Bytes

Versions: 20

Compression:

Stored size: 324 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module DearInventory
  class DateTime
    extend T::Sig

    sig { params(date: T.any(Date, Time)).void }
    def initialize(date)
      @date = T.let(date, T.any(Date, Time))
    end

    sig { returns(String) }
    def to_s
      @date.strftime("%FT%T%:z")
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
dear_inventory-1.3.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-1.2.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-1.1.1 lib/dear_inventory/lib/date_time.rb
dear_inventory-1.1.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-1.0.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.7.5 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.7.4 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.7.3 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.7.2 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.7.1 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.7.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.6.3 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.6.2 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.6.1 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.6.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.5.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.4.1 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.4.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.3.0 lib/dear_inventory/lib/date_time.rb
dear_inventory-0.2.0 lib/dear_inventory/lib/date_time.rb