Module: AntTokyoTyrant

Defined in:
lib/ant_mapper/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/ant_mapper/adapters/tokyo_tyrant.rb', line 4

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

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

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