Sha256: 092c8dcef13c59016b5c6041480cc8cf1804926e07d1df6f24d008400b6da7df

Contents?: true

Size: 533 Bytes

Versions: 35

Compression:

Stored size: 533 Bytes

Contents

require 'active_support/ordered_options'

module ActiveRemote
  class Config < ::ActiveSupport::OrderedOptions
    def initialize(options = {})
      super

      self.default_cache_key_updated_at = false
      self.include_root_in_json = true
    end

    def default_cache_key_updated_at?
      self[:default_cache_key_updated_at]
    end

    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
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
active_remote-3.3.3 lib/active_remote/config.rb
active_remote-3.3.2 lib/active_remote/config.rb
active_remote-3.3.1 lib/active_remote/config.rb
active_remote-3.3.0 lib/active_remote/config.rb
active_remote-3.2.2 lib/active_remote/config.rb
active_remote-3.2.1 lib/active_remote/config.rb
active_remote-3.2.0 lib/active_remote/config.rb
active_remote-3.2.0.pre lib/active_remote/config.rb
active_remote-3.1.3 lib/active_remote/config.rb
active_remote-3.1.2 lib/active_remote/config.rb
active_remote-3.1.2.pre lib/active_remote/config.rb
active_remote-3.1.1 lib/active_remote/config.rb
active_remote-3.1.0 lib/active_remote/config.rb
active_remote-3.0.0 lib/active_remote/config.rb
active_remote-3.0.0.pre1 lib/active_remote/config.rb
active_remote-2.4.0 lib/active_remote/config.rb
active_remote-2.3.5 lib/active_remote/config.rb
active_remote-2.3.4 lib/active_remote/config.rb
active_remote-2.3.3 lib/active_remote/config.rb
active_remote-2.3.3.pre lib/active_remote/config.rb