class Counter::Cache::OptionsParser
Public Instance Methods
cached?()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 40 def cached? option_or_true options[:cache] end
column()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 12 def column options[:column] end
if_value()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 52 def if_value options[:if] end
increment_by()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 36 def increment_by options[:increment_by] end
method()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 32 def method options[:method] end
polymorphic?()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 48 def polymorphic? options[:polymorphic] end
recalculation?()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 44 def recalculation? option_or_true options[:recalculation] end
recalculation_delay()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 65 def recalculation_delay options[:recalculation_delay] || Counter::Cache.configuration.recalculation_delay end
relation()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 20 def relation options[:relation] end
relation_class_name()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 24 def relation_class_name options[:relation_class_name] end
relation_id()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 28 def relation_id options[:relation_id] end
source_object_class_name()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 8 def source_object_class_name options[:source_object_class_name] end
touch_column()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 16 def touch_column options[:touch_column] end
wait(source_object)
click to toggle source
# File lib/counter/cache/options_parser.rb, line 56 def wait(source_object) wait = options[:wait] if wait.respond_to?(:call) wait.call(source_object) else wait end end
worker_adapter()
click to toggle source
# File lib/counter/cache/options_parser.rb, line 4 def worker_adapter options[:worker_adapter] || Counter::Cache.configuration.default_worker_adapter end
Protected Instance Methods
option_or_true(val)
click to toggle source
# File lib/counter/cache/options_parser.rb, line 71 def option_or_true(val) val || val.nil? end