Module: ActiveObjectTokyoTyrant

Defined in:
lib/active_object/adapters/tokyo_tyrant.rb

Overview

访问TokyoTyrant的加载模块

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/active_object/adapters/tokyo_tyrant.rb', line 4

def self.included(base)
	require 'uri'
	require 'rufus/tokyo'
	uri  = URI.parse(base.configurations)

	base.extend ActiveObjectTokyoCabinet::ClassMethods
	base.send :include, ActiveObjectTokyoCabinet::InstanceMethods

	base.send :adb=, Rufus::Tokyo::Tyrant.new(uri.host,uri.port)
end