Sha256: e535b35e6ef5efc420881baf34a334fddf14690322ee27dc9ec45c8095e00178
Contents?: true
Size: 920 Bytes
Versions: 17
Compression:
Stored size: 920 Bytes
Contents
require File.dirname(__FILE__) + "/remoter_base" require File.dirname(__FILE__) + "/remoter" module PoolParty module Remote include PoolParty::Remote::Remoter def using(t) @cloud = self if available_bases.include?(t.to_sym) unless using_remoter? || t.nil? self.class.send :attr_reader, :remote_base self.class.send :attr_reader, :parent_cloud mod = "#{t}".preserved_module_constant # mod.send :include, PoolParty::Remote::RemoterBase self.class.send :include, mod self.extend mod @remote_base = "#{t}".preserved_module_constant @parent_cloud = @cloud end else puts "Unknown remote base" end end def available_bases remote_bases end def using_remoter? @remote_base ||= nil end end end
Version data entries
17 entries across 17 versions & 2 rubygems