Class: ActiveRemote::Config

Inherits:
ActiveSupport::OrderedOptions
  • Object
show all
Defined in:
lib/active_remote/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.



6
7
8
9
10
11
# File 'lib/active_remote/config.rb', line 6

def initialize(options = {})
  super

  self.default_cache_key_updated_at = false
  self.include_root_in_json = true
end

Instance Method Details

#default_cache_key_updated_at? ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/active_remote/config.rb', line 13

def default_cache_key_updated_at?
  self[:default_cache_key_updated_at]
end

#include_root_in_json=(true_or_false) ⇒ Object



17
18
19
20
# File 'lib/active_remote/config.rb', line 17

def include_root_in_json=(true_or_false)
  self[:include_root_in_json] = !!true_or_false
  ::ActiveRemote::Base.include_root_in_json = self[:include_root_in_json]
end