Module: UaUtils

Defined in:
lib/ua-utils.rb,
lib/ua-utils/user_agent.rb,
lib/ua-utils/operating_system.rb

Defined Under Namespace

Classes: OperatingSystem, UserAgent

Constant Summary collapse

VERSION =
'0.3.3'

Class Method Summary collapse

Class Method Details

.default_loggerObject



12
13
14
15
16
17
# File 'lib/ua-utils.rb', line 12

def self.default_logger
  require 'logger'
  l = Logger.new(STDOUT)
  l.level = Logger::INFO
  l
end

.loggerObject



8
9
10
# File 'lib/ua-utils.rb', line 8

def self.logger
  @logger ||= (rails_logger || default_logger)
end

.logger=(logger) ⇒ Object



19
20
21
# File 'lib/ua-utils.rb', line 19

def self.logger=(logger)
  @logger = logger
end