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.
215 216 217 218 219 |
# File 'lib/wakame/event.rb', line 215 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.
214 215 216 |
# File 'lib/wakame/event.rb', line 214 def count @count end |
#prev_count ⇒ Object (readonly)
Returns the value of attribute prev_count.
214 215 216 |
# File 'lib/wakame/event.rb', line 214 def prev_count @prev_count end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
214 215 216 |
# File 'lib/wakame/event.rb', line 214 def resource @resource end |
Instance Method Details
#decreased? ⇒ Boolean
225 226 227 |
# File 'lib/wakame/event.rb', line 225 def decreased? @prev_count > @count end |
#increased? ⇒ Boolean
221 222 223 |
# File 'lib/wakame/event.rb', line 221 def increased? @prev_count < @count end |