Sha256: 0ba42affc34988178b264638f769f24cb38e88da7304de0fef3b2c768d82400d

Contents?: true

Size: 498 Bytes

Versions: 9

Compression:

Stored size: 498 Bytes

Contents

module Architect4r
  module Model
    module Connection
      extend ActiveSupport::Concern
      
      module InstanceMethods
      
        def connection
          self.class.connection
        end
        
      end
      
      module ClassMethods
        
        def use_server(server)
          @connection = server
        end
        
        def connection
          # TODO: apply configuration
          @connection || Server.new
        end
        
      end
      
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
architect4r-0.4.3 lib/architect4r/model/connection.rb
architect4r-0.4.2 lib/architect4r/model/connection.rb
architect4r-0.4.1 lib/architect4r/model/connection.rb
architect4r-0.4 lib/architect4r/model/connection.rb
architect4r-0.3.4.2 lib/architect4r/model/connection.rb
architect4r-0.3.4.1 lib/architect4r/model/connection.rb
architect4r-0.3.4 lib/architect4r/model/connection.rb
architect4r-0.3.3.1 lib/architect4r/model/connection.rb
architect4r-0.3.2 lib/architect4r/model/connection.rb