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.



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

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)


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

def default_cache_key_updated_at?
  self[:default_cache_key_updated_at]
end

#include_root_in_json=(true_or_false) ⇒ Object



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

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