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

Version Path
auser-poolparty-0.2.15 lib/poolparty/net/remote.rb
auser-poolparty-0.2.16 lib/poolparty/net/remote.rb
auser-poolparty-0.2.20 lib/poolparty/net/remote.rb
auser-poolparty-0.2.21 lib/poolparty/net/remote.rb
auser-poolparty-0.2.22 lib/poolparty/net/remote.rb
auser-poolparty-0.2.23 lib/poolparty/net/remote.rb
auser-poolparty-0.2.24 lib/poolparty/net/remote.rb
auser-poolparty-0.2.25 lib/poolparty/net/remote.rb
auser-poolparty-0.2.26 lib/poolparty/net/remote.rb
auser-poolparty-0.2.3 lib/poolparty/net/remote.rb
auser-poolparty-0.2.35 lib/poolparty/net/remote.rb
auser-poolparty-0.2.36 lib/poolparty/net/remote.rb
auser-poolparty-0.2.37 lib/poolparty/net/remote.rb
auser-poolparty-0.2.38 lib/poolparty/net/remote.rb
auser-poolparty-0.2.39 lib/poolparty/net/remote.rb
auser-poolparty-0.2.4 lib/poolparty/net/remote.rb
auser-poolparty-0.2.40 lib/poolparty/net/remote.rb
auser-poolparty-0.2.41 lib/poolparty/net/remote.rb
auser-poolparty-0.2.5 lib/poolparty/net/remote.rb
auser-poolparty-0.2.6 lib/poolparty/net/remote.rb