Sha256: e0a01626a896aae1eddf1bed781eea7dc3398b7a39e9c93bc36f8a7e576d4954

Contents?: true

Size: 372 Bytes

Versions: 17

Compression:

Stored size: 372 Bytes

Contents

module Almanack
  ONE_HOUR = 60 * 60
  ONE_DAY = 24 * ONE_HOUR
  ONE_MONTH = 30 * ONE_DAY
  ONE_YEAR = 365 * ONE_DAY

  class << self
    def config(&block)
      @config ||= Configuration.new
      yield @config if block_given?
      @config
    end

    def calendar
      @calendar ||= Calendar.new(config)
    end

    def reset!
      config.reset!
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
almanack-1.3.1 lib/almanack/base.rb
almanack-1.3.0 lib/almanack/base.rb
almanack-1.3.0.rc1 lib/almanack/base.rb
almanack-1.2.1 lib/almanack/base.rb
almanack-1.2.0 lib/almanack/base.rb
almanack-1.1.5 lib/almanack/base.rb
almanack-1.1.3 lib/almanack/base.rb
almanack-1.1.3.rc1 lib/almanack/base.rb
almanack-1.1.2 lib/almanack/base.rb
almanack-1.1.1 lib/almanack/base.rb
almanack-1.1.0 lib/almanack/base.rb
almanack-1.1.0.beta6 lib/almanack/base.rb
almanack-1.1.0.beta5 lib/almanack/base.rb
almanack-1.1.0.beta4 lib/almanack/base.rb
almanack-1.1.0.beta3 lib/almanack/base.rb
almanack-1.1.0.beta2 lib/almanack/base.rb
almanack-1.1.0.beta1 lib/almanack/base.rb