Sha256: d0087a9356268cf9bd9461822453212e84d46fb628ad62377f925e50e0572d5d
Contents?: true
Size: 394 Bytes
Versions: 15
Compression:
Stored size: 394 Bytes
Contents
if RUBY_PLATFORM == 'opal' # The basic front-end logger, log to console class Logger def initialize(*args) # TODO: handle options end [:fatal, :info, :warn, :debug, :error].each do |method_name| define_method(method_name) do |text, &block| text = block.call if block `console[method_name](text);` end end end else require 'logger' end
Version data entries
15 entries across 15 versions & 1 rubygems