Class: IRuby::SessionAdapter::BaseAdapter
- Inherits:
-
Object
- Object
- IRuby::SessionAdapter::BaseAdapter
show all
- Defined in:
- lib/iruby/session_adapter.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseAdapter.
17
18
19
|
# File 'lib/iruby/session_adapter.rb', line 17
def initialize(config)
@config = config
end
|
Class Method Details
.available? ⇒ Boolean
6
7
8
9
10
11
|
# File 'lib/iruby/session_adapter.rb', line 6
def self.available?
load_requirements
true
rescue LoadError
false
end
|
.load_requirements ⇒ Object
13
14
15
|
# File 'lib/iruby/session_adapter.rb', line 13
def self.load_requirements
end
|
Instance Method Details
#make_pub_socket(protocol, host, port) ⇒ Object
30
31
32
33
|
# File 'lib/iruby/session_adapter.rb', line 30
def make_pub_socket(protocol, host, port)
socket, port = make_socket(:PUB, protocol, host, port)
[socket, port]
end
|
#make_rep_socket(protocol, host, port) ⇒ Object
35
36
37
38
|
# File 'lib/iruby/session_adapter.rb', line 35
def make_rep_socket(protocol, host, port)
socket, port = make_socket(:REP, protocol, host, port)
[socket, port]
end
|
#make_router_socket(protocol, host, port) ⇒ Object
25
26
27
28
|
# File 'lib/iruby/session_adapter.rb', line 25
def make_router_socket(protocol, host, port)
socket, port = make_socket(:ROUTER, protocol, host, port)
[socket, port]
end
|
#name ⇒ Object
21
22
23
|
# File 'lib/iruby/session_adapter.rb', line 21
def name
self.class.name[/::(\w+)Adapter\Z/, 1].downcase
end
|