Module: TamTam
- Defined in:
- lib/tam_tam/core.rb,
lib/tam_tam/adapter.rb,
lib/tam_tam/log_set.rb,
lib/tam_tam/message.rb,
lib/tam_tam/version.rb,
lib/tam_tam/message_set.rb,
lib/tam_tam/adapters/adium.rb
Overview
The primary entry point for users.
Defined Under Namespace
Modules: Adapters
Classes: AbstractMethodError, Adapter, LogSet, Message, MessageSet
Constant Summary
collapse
- VERSION =
"0.0.1"
Class Method Summary
collapse
Class Method Details
.adapters ⇒ Object
24
25
26
|
# File 'lib/tam_tam/core.rb', line 24
def adapters
@adapters.keys
end
|
.new(options = {}) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/tam_tam/core.rb', line 8
def new(options = {})
adapter_key = options[:adapter]
adapter_key = :adium if adapter_key.nil? && adapters.include?(:adium)
adapter_key = adapters.first if adapter_key.nil?
adapter = @adapters[adapter_key].new(options[:path])
LogSet.new(adapter)
end
|
.register_adapter(key, adapter) ⇒ Object
16
17
18
|
# File 'lib/tam_tam/core.rb', line 16
def register_adapter(key, adapter)
@adapters[key] = adapter
end
|
.unregister_adapter(key) ⇒ Object
20
21
22
|
# File 'lib/tam_tam/core.rb', line 20
def unregister_adapter(key)
@adapters.delete(key)
end
|