Class: Alf::Adapter::Memory

Inherits:
Alf::Adapter show all
Defined in:
lib/alf/adapter/memory.rb,
lib/alf/adapter/memory/connection.rb

Defined Under Namespace

Classes: Connection

Instance Attribute Summary

Attributes inherited from Alf::Adapter

#conn_spec

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Alf::Adapter

autodetect, #connect, factor, #initialize, register

Methods included from Support::Registry

#each, #listen, #listeners, #register, #registered

Constructor Details

This class inherits a constructor from Alf::Adapter

Class Method Details

.recognizes?(conn_spec) ⇒ Boolean


9
10
11
# File 'lib/alf/adapter/memory.rb', line 9

def self.recognizes?(conn_spec)
  conn_spec == 'memory://'
end

Instance Method Details

#connectionObject

Returns a connection on some memory relvars


14
15
16
# File 'lib/alf/adapter/memory.rb', line 14

def connection
  Memory::Connection.new(conn_spec)
end

#to_sObject


18
19
20
# File 'lib/alf/adapter/memory.rb', line 18

def to_s
  "Alf::Adapter::Memory(#{conn_spec})"
end