Module: Spinel

Extended by:
Config
Defined in:
lib/spinel.rb,
lib/spinel/client.rb,
lib/spinel/config.rb,
lib/spinel/helper.rb,
lib/spinel/indexer.rb,
lib/spinel/version.rb,
lib/spinel/searcher.rb,
lib/spinel/connection_pool_proxy.rb

Defined Under Namespace

Modules: Config, Helper, Indexer, Searcher Classes: Client, ConnectionPoolProxy

Constant Summary collapse

MAJOR =
1
MINOR =
0
PATCH =
0
VERSION =
[MAJOR, MINOR, PATCH].compact.join('.')

Constants included from Config

Config::DEFAULT_CACHE_EXPIRE, Config::DEFAULT_INDEX_FIELDS, Config::DEFAULT_MINIMAL_WORD, Config::DEFAULT_NAMESPACE, Config::DEFAULT_SEARCH_LIMIT

Instance Attribute Summary

Attributes included from Config

#cache_expire, #index_fields, #minimal_word, #namespace, #search_limit

Class Method Summary collapse

Methods included from Config

configure, redis, redis=

Class Method Details

.method_missing(method_name, *args, type: :default, &block) ⇒ Object



18
19
20
21
# File 'lib/spinel.rb', line 18

def self.method_missing(method_name, *args, type: :default, &block)
  return super unless new(type).respond_to?(method_name)
  new(type).send(method_name, *args, &block)
end

.new(type = :default) ⇒ Object



14
15
16
# File 'lib/spinel.rb', line 14

def self.new type = :default
  Client.new type
end

.respond_to?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/spinel.rb', line 23

def self.respond_to?(method_name, include_private = false)
  new.respond_to?(method_name, include_private) || super
end