class CalInvite::Configuration
Attributes
Public Class Methods
Source
# File lib/cal_invite/configuration.rb 17 def initialize 18 @cache_store = nil 19 @cache_prefix = 'cal_invite' 20 @cache_expires_in = 24 * 60 * 60 21 @webhook_secret = nil 22 @timezone = 'UTC' 23 end
Initializes a new Configuration instance with default values.
Public Instance Methods
Source
# File lib/cal_invite/configuration.rb 59 def cache_expires_in=(duration) 60 warn_deprecated_cache_setting(:cache_expires_in) 61 @cache_expires_in = duration.to_i 62 end
@deprecated Has no effect; warns, and will be removed in 0.4.0.
@param duration [#to_i] The duration in seconds
Source
# File lib/cal_invite/configuration.rb 51 def cache_prefix=(prefix) 52 warn_deprecated_cache_setting(:cache_prefix) 53 @cache_prefix = prefix.to_s 54 end
@deprecated Has no effect; warns, and will be removed in 0.4.0.
@param prefix [#to_s] The prefix to use for cache keys
Source
# File lib/cal_invite/configuration.rb 30 def cache_store=(store) 31 warn_deprecated_cache_setting(:cache_store) 32 @cache_store = case store 33 when :memory_store 34 ActiveSupport::Cache::MemoryStore.new 35 when :null_store 36 ActiveSupport::Cache::NullStore.new 37 when Symbol 38 raise ArgumentError, "Unsupported cache store: #{store}" 39 else 40 # Allow custom cache store objects that respond to read/write/delete 41 unless store.respond_to?(:read) && store.respond_to?(:write) && store.respond_to?(:delete) 42 raise ArgumentError, "Custom cache store must implement read/write/delete methods" 43 end 44 store 45 end 46 end
@deprecated CalInvite caches nothing, so this setting has no effect. It warns, and will be removed in 0.4.0.
@param store [Symbol, #read, #write, #delete] The cache store to use @raise [ArgumentError] If an unsupported cache store is provided
Source
# File lib/cal_invite/configuration.rb 74 def timezone=(tz) 75 @timezone = tz.to_s 76 end
Sets the default timezone for events.
@param tz [#to_s] The timezone identifier
Source
# File lib/cal_invite/configuration.rb 67 def webhook_secret=(secret) 68 @webhook_secret = secret 69 end
Sets the webhook secret for verification.
@param secret [String, nil] The secret key
Private Instance Methods
# File lib/cal_invite/configuration.rb 80 def warn_deprecated_cache_setting(name) 81 warn "[cal_invite] Configuration##{name}= is deprecated and has no effect: " \ 82 "CalInvite no longer caches anything. Remove it; it will be removed in 0.4.0.", 83 uplevel: 2 84 end