Sha256: 3443b8467b42c53fd22af6f6f84e382c1d175a72672765eb2976e2e609569dab

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

module Minuteman
  class Configuration
    attr_reader :redis
    attr_accessor :patterns, :prefix, :parallel, :operations_prefix

    def initialize
      @redis = Ohm.redis
      @prefix = "Minuteman".freeze
      @operations_prefix = "#{@prefix}::Operations:"
      @parallel = false

      @patterns = {
        year:   -> (time) { time.strftime("%Y") },
        month:  -> (time) { time.strftime("%Y-%m") },
        day:    -> (time) { time.strftime("%Y-%m-%d") },
        hour:   -> (time) { time.strftime("%Y-%m-%d %H") },
        minute: -> (time) { time.strftime("%Y-%m-%d %H:%M") },
      }
    end

    def redis=(redis)
      @redis = redis
      Ohm.redis = redis
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minuteman-3.0.0 lib/minuteman/configuration.rb