Sha256: 37886fb3d9731fb810953d7d15dc53ab80f44b6589ffe35d8db5f112490c7a66
Contents?: true
Size: 821 Bytes
Versions: 24
Compression:
Stored size: 821 Bytes
Contents
require File.dirname(__FILE__) + "/remoter_base" require File.dirname(__FILE__) + "/remoter" module PoolParty module Remote include PoolParty::Remote::Remoter def using(t) if available_bases.include?(t.to_sym) unless using_remoter? || t.nil? self.class.send :attr_reader, :remote_base 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 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
24 entries across 24 versions & 2 rubygems