Sha256: c7dd6ddc6d628043fda9b4cd62d72d46731ed41f46b766f9879d76c6729f0984
Contents?: true
Size: 779 Bytes
Versions: 7
Compression:
Stored size: 779 Bytes
Contents
module Lacquer class Configuration OPTIONS = [] # Enable cache attr_accessor :enable_cache # Varnish servers attr_accessor :varnish_servers # Application default ttl attr_accessor :default_ttl # Number of retries before failing attr_accessor :retries # Job backend attr_accessor :job_backend # Error handler attr_accessor :command_error_handler def initialize @enable_cache = true @varnish_servers = [] @default_ttl = 0 @job_backend = :none @retries = 5 @command_error_handler = nil end # Returns a hash of all configurable options def to_hash OPTIONS.inject({}) do |hash, option| hash.merge(option.to_sym => send(option)) end end end end
Version data entries
7 entries across 7 versions & 2 rubygems