Module: Msgr
- Defined in:
- lib/msgr.rb,
lib/msgr/route.rb,
lib/msgr/client.rb,
lib/msgr/errors.rb,
lib/msgr/routes.rb,
lib/msgr/logging.rb,
lib/msgr/message.rb,
lib/msgr/railtie.rb,
lib/msgr/version.rb,
lib/msgr/consumer.rb,
lib/msgr/connection.rb,
lib/msgr/dispatcher.rb
Defined Under Namespace
Modules: Logging, VERSION
Classes: CausedByError, Client, Connection, ConnectionError, Consumer, Dispatcher, Message, Railtie, Route, Routes
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.client ⇒ Object
31
32
33
|
# File 'lib/msgr.rb', line 31
def client
@client ||= Msgr::Client.new config
end
|
.config ⇒ Object
27
28
29
|
# File 'lib/msgr.rb', line 27
def config
@config ||= {}
end
|
Class Method Details
.logger ⇒ Object
35
36
37
38
39
40
41
42
|
# File 'lib/msgr.rb', line 35
def logger
if @logger.nil?
@logger = Logger.new $stdout
@logger.level = Logger::Severity::INFO
end
@logger
end
|
.logger=(logger) ⇒ Object
44
45
46
|
# File 'lib/msgr.rb', line 44
def logger=(logger)
@logger = logger
end
|
.start ⇒ Object
48
49
50
51
|
# File 'lib/msgr.rb', line 48
def start
client.start
client
end
|