Sha256: 05f06e1c7fca87675e20027a39c6736086176a4a4507585825a6a076ef7d61f6
Contents?: true
Size: 668 Bytes
Versions: 1
Compression:
Stored size: 668 Bytes
Contents
module ReportsKit class Configuration attr_accessor :cache_duration, :cache_store, :context_params_method, :context_record_method, :custom_methods, :first_day_of_week def initialize self.cache_duration = 5.minutes self.cache_store = nil self.context_params_method = nil self.context_record_method = nil self.custom_methods = {} self.first_day_of_week = :sunday end def custom_method(method_name) return if method_name.blank? method = custom_methods[method_name.to_sym] raise ArgumentError.new("A method named '#{method_name}' is not defined") unless method method end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reports_kit-0.2.0 | lib/reports_kit/configuration.rb |