Sha256: c863f80d3b74b8769f68246c617fe02345f2bdfbef46da955a502d1e3e8e87bd

Contents?: true

Size: 785 Bytes

Versions: 1

Compression:

Stored size: 785 Bytes

Contents

require "positive_time_support/version"

require "active_support"
require "active_support/core_ext"

require 'date'
require 'holiday_japan'

[ :time , :date , :date_time ].each do | filename |
  require_relative "positive_time_support/#{ filename }_ext"
end

module PositiveTimeSupport

  extend ::ActiveSupport::Concern

  included do

    ::Time.class_eval do
      include PositiveTimeSupport::TimeExt
      include PositiveTimeSupport::DateExt
    end

    ::Date.class_eval do
      include PositiveTimeSupport::DateExt
    end

    # DateTime is a sub-class of Date
    ::DateTime.class_eval do
      include PositiveTimeSupport::TimeExt
      # include PositiveTimeSupport::DateExt
      include PositiveTimeSupport::DateTimeExt
    end

  end

end

include PositiveTimeSupport

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
positive_time_support-0.2.0 lib/positive_time_support.rb