Module: ActiveMatrix
- Defined in:
- lib/active_matrix.rb,
lib/active_matrix/api.rb,
lib/active_matrix/bot.rb,
lib/active_matrix/mxid.rb,
lib/active_matrix/room.rb,
lib/active_matrix/user.rb,
lib/active_matrix/client.rb,
lib/active_matrix/errors.rb,
lib/active_matrix/logging.rb,
lib/active_matrix/railtie.rb,
lib/active_matrix/version.rb,
lib/active_matrix/response.rb,
lib/active_matrix/util/events.rb,
lib/active_matrix/util/extensions.rb,
lib/active_matrix/util/rails_cache_adapter.rb
Defined Under Namespace
Modules: Bot, Extensions, Logging, Response, Rooms, Util
Classes: Api, Client, ErrorEvent, Event, EventHandlerArray, MXID, MatrixConflictError, MatrixConnectionError, MatrixError, MatrixEvent, MatrixForbiddenError, MatrixNotAuthorizedError, MatrixNotFoundError, MatrixRequestError, MatrixTimeoutError, MatrixTooManyRequestsError, MatrixUnexpectedResponseError, Railtie, Room, User
Constant Summary
collapse
- Loader =
Zeitwerk::Loader.for_gem
- VERSION =
'0.0.1'
Class Method Summary
collapse
Class Method Details
44
45
46
47
48
49
50
|
# File 'lib/active_matrix/logging.rb', line 44
def debug!
logger.level = if defined?(::Rails)
:debug
else
::Logger::DEBUG
end
end
|
.global_logger? ⇒ Boolean
52
53
54
|
# File 'lib/active_matrix/logging.rb', line 52
def global_logger?
@global_logger ||= false
end
|
29
30
31
32
33
34
35
36
37
|
# File 'lib/active_matrix/logging.rb', line 29
def logger
@logger ||= if defined?(::Rails) && ::Rails.respond_to?(:logger)
::Rails.logger
else
require 'logger'
::Logger.new($stdout)
end
end
|
.logger=(logger) ⇒ Object
39
40
41
42
|
# File 'lib/active_matrix/logging.rb', line 39
def logger=(logger)
@logger = logger
@global_logger = !logger.nil?
end
|