Class: Wakame::Event::InstanceCountChanged

Inherits:
Base
  • Object
show all
Defined in:
lib/wakame/event.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#time

Instance Method Summary collapse

Methods inherited from Base

#log_message

Constructor Details

#initialize(resource, prev_count, count) ⇒ InstanceCountChanged

Returns a new instance of InstanceCountChanged.



267
268
269
270
271
# File 'lib/wakame/event.rb', line 267

def initialize(resource, prev_count, count)
  @resource = resource
  @prev_count = prev_count
  @count = count
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



266
267
268
# File 'lib/wakame/event.rb', line 266

def count
  @count
end

#prev_countObject (readonly)

Returns the value of attribute prev_count.



266
267
268
# File 'lib/wakame/event.rb', line 266

def prev_count
  @prev_count
end

#resourceObject (readonly)

Returns the value of attribute resource.



266
267
268
# File 'lib/wakame/event.rb', line 266

def resource
  @resource
end

Instance Method Details

#decreased?Boolean

Returns:

  • (Boolean)


277
278
279
# File 'lib/wakame/event.rb', line 277

def decreased?
  @prev_count > @count
end

#increased?Boolean

Returns:

  • (Boolean)


273
274
275
# File 'lib/wakame/event.rb', line 273

def increased?
  @prev_count < @count
end