Module: CacheJSON::Base::ClassMethods

Defined in:
lib/cache_json/base.rb

Instance Method Summary collapse

Instance Method Details

#cache_json_class_specific_overridesObject

Just the class-specific overrides



78
79
80
# File 'lib/cache_json/base.rb', line 78

def cache_json_class_specific_overrides
  @cache_json_class_specific_overrides ||= {}
end

#cache_json_full_optionsObject

Getter (inherits from global defaults)



83
84
85
# File 'lib/cache_json/base.rb', line 83

def cache_json_full_options
  CacheJSON::Config.options.merge(cache_json_class_specific_overrides).merge(class_name: to_s)
end

#cache_json_options(options_hash) ⇒ Object

Setter



73
74
75
# File 'lib/cache_json/base.rb', line 73

def cache_json_options(options_hash)
  cache_json_class_specific_overrides.merge!(options_hash)
end