Class: Message

Inherits:
Object show all
Defined in:
lib/salticid/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Message

Returns a new instance of Message.


3
4
5
6
7
# File 'lib/salticid/message.rb', line 3

def initialize(*args)
  @text = args.pop
  @severity = args.first
  @time = Time.now
end

Instance Attribute Details

#severityObject (readonly)

Returns the value of attribute severity


2
3
4
# File 'lib/salticid/message.rb', line 2

def severity
  @severity
end

#textObject (readonly)

Returns the value of attribute text


2
3
4
# File 'lib/salticid/message.rb', line 2

def text
  @text
end

#timeObject (readonly)

Returns the value of attribute time


2
3
4
# File 'lib/salticid/message.rb', line 2

def time
  @time
end