Sha256: 805baac19aaf53fa8ad61b21f45f870eb0856f542486df242471dcd2c62131a0

Contents?: true

Size: 300 Bytes

Versions: 1

Compression:

Stored size: 300 Bytes

Contents

# frozen_string_literal: true

require "date"
require_relative "../object/acts_like"

class DateTime
  # Duck-types as a Date-like class. See Object#acts_like?.
  def acts_like_date?
    true
  end

  # Duck-types as a Time-like class. See Object#acts_like?.
  def acts_like_time?
    true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-on-quails-0.1.0 activesupport/lib/active_support/core_ext/date_time/acts_like.rb