Class: Wakame::Event::ServiceStatusChanged

Inherits:
ServiceStatus show all
Defined in:
lib/wakame/event.rb

Instance Attribute Summary collapse

Attributes inherited from ServiceStatus

#instance_id, #property

Attributes inherited from Base

#time

Instance Method Summary collapse

Constructor Details

#initialize(instance_id, property, new_status, prev_status) ⇒ ServiceStatusChanged

Returns a new instance of ServiceStatusChanged.



42
43
44
45
46
# File 'lib/wakame/event.rb', line 42

def initialize(instance_id, property, new_status, prev_status)
  super(instance_id, property)
  @status = new_status
  @previous_status = prev_status
end

Instance Attribute Details

#previous_statusObject (readonly)

Returns the value of attribute previous_status.



41
42
43
# File 'lib/wakame/event.rb', line 41

def previous_status
  @previous_status
end

#statusObject (readonly)

Returns the value of attribute status.



41
42
43
# File 'lib/wakame/event.rb', line 41

def status
  @status
end

Instance Method Details

#log_messageObject



48
49
50
# File 'lib/wakame/event.rb', line 48

def log_message
  "#{instance_id}, #{@previous_status} -> #{@status}"
end