Module: ActiveObjectLightCloud
- Defined in:
- lib/active_object/adapters/light_cloud.rb
Overview
访问LightCloud的加载模块
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/active_object/adapters/light_cloud.rb', line 4 def self.included(base) require 'lightcloud' base.send "configurations=", YAML.load_file(base.configurations) if base.configurations.is_a?(String) base.configurations.each do |key,value| lookup_nodes, storage_nodes = LightCloud.generate_nodes(value) LightCloud.init(lookup_nodes, storage_nodes,key) end base.extend ClassMethods base.send :include, InstanceMethods end |