Sha256: 9b253149375d2d83a0ee27e0c636c64cde790281b7ca049a41b1ddb7096dccee
Contents?: true
Size: 549 Bytes
Versions: 12
Compression:
Stored size: 549 Bytes
Contents
module Hieracles class Notification attr_reader :level, :message, :timestamp, :source LEVEL = { 'fatal' => 0, 'error' => 1, 'warning' => 2, 'info' => 3, 'debug' => 4 } def initialize(source, message, level = 'info') @source = source @level = level @message = message @timestamp = Time.new end def to_hash { 'source' => @source, 'level' => @level, 'message' => @message, 'timestamp' => @timestamp } end end end
Version data entries
12 entries across 12 versions & 1 rubygems