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

Version Path
auser-poolparty-0.2.61 lib/poolparty/net/remote.rb
auser-poolparty-0.2.62 lib/poolparty/net/remote.rb
auser-poolparty-0.2.63 lib/poolparty/net/remote.rb
auser-poolparty-0.2.64 lib/poolparty/net/remote.rb
auser-poolparty-0.2.65 lib/poolparty/net/remote.rb
auser-poolparty-0.2.66 lib/poolparty/net/remote.rb
auser-poolparty-0.2.67 lib/poolparty/net/remote.rb
auser-poolparty-0.2.68 lib/poolparty/net/remote.rb
auser-poolparty-0.2.69 lib/poolparty/net/remote.rb
auser-poolparty-0.2.70 lib/poolparty/net/remote.rb
auser-poolparty-0.2.71 lib/poolparty/net/remote.rb
auser-poolparty-0.2.72 lib/poolparty/net/remote.rb
auser-poolparty-0.2.74 lib/poolparty/net/remote.rb
auser-poolparty-0.2.76 lib/poolparty/net/remote.rb
auser-poolparty-0.2.77 lib/poolparty/net/remote.rb
auser-poolparty-0.2.78 lib/poolparty/net/remote.rb
poolparty-0.2.69 lib/poolparty/net/remote.rb