Module: Settis

Defined in:
lib/settis/setting.rb,
lib/settis.rb,
lib/settis/version.rb,
lib/settis/container.rb,
lib/settis/serializer.rb,
lib/settis/settings/scalar.rb,
lib/settis/serializers/string.rb,
lib/settis/serializers/boolean.rb,
lib/settis/serializers/integer.rb,
lib/settis/serializers/active_record.rb

Overview

Copyright 2011 Brennan Frydl (bfrydl.com/)

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Modules: Container Classes: ActiveRecordSerializer, BooleanSerializer, IntegerSerializer, ScalarSetting, Serializer, Setting, StringSerializer

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.redisObject

Gets the global Redis client used by Settis.



27
28
29
# File 'lib/settis.rb', line 27

def redis
  @redis ||= Redis.new
end

.redis=(value) ⇒ Object

Sets the global Redis client used by Settis.

Parameters:

  • value

    Should be or act like ‘Redis` from the `redis` gem.



33
34
35
36
# File 'lib/settis.rb', line 33

def redis=(value)
  @redis.disconnect unless @redis.nil? or !@redis.connected?
  @redis = value
end