Class: Wakame::Event::InstanceCountChanged
- Defined in:
- lib/wakame/event.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#prev_count ⇒ Object
readonly
Returns the value of attribute prev_count.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Attributes inherited from Base
Instance Method Summary collapse
- #decreased? ⇒ Boolean
- #increased? ⇒ Boolean
-
#initialize(resource, prev_count, count) ⇒ InstanceCountChanged
constructor
A new instance of InstanceCountChanged.
Methods inherited from Base
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
#count ⇒ Object (readonly)
Returns the value of attribute count.
266 267 268 |
# File 'lib/wakame/event.rb', line 266 def count @count end |
#prev_count ⇒ Object (readonly)
Returns the value of attribute prev_count.
266 267 268 |
# File 'lib/wakame/event.rb', line 266 def prev_count @prev_count end |
#resource ⇒ Object (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
277 278 279 |
# File 'lib/wakame/event.rb', line 277 def decreased? @prev_count > @count end |
#increased? ⇒ Boolean
273 274 275 |
# File 'lib/wakame/event.rb', line 273 def increased? @prev_count < @count end |