Class: Delayer::Bucket
- Inherits:
-
Object
- Object
- Delayer::Bucket
- Defined in:
- lib/delayer/extend.rb
Instance Attribute Summary collapse
-
#first ⇒ Object
Returns the value of attribute first.
-
#last ⇒ Object
Returns the value of attribute last.
-
#priority_of ⇒ Object
Returns the value of attribute priority_of.
-
#stashed ⇒ Object
Returns the value of attribute stashed.
Instance Method Summary collapse
-
#initialize(first, last, priority_of, stashed) ⇒ Bucket
constructor
A new instance of Bucket.
- #stash_size ⇒ Object
Constructor Details
#initialize(first, last, priority_of, stashed) ⇒ Bucket
Returns a new instance of Bucket.
11 12 13 14 15 16 |
# File 'lib/delayer/extend.rb', line 11 def initialize(first, last, priority_of, stashed) @first = first @last = last @priority_of = priority_of @stashed = stashed end |
Instance Attribute Details
#first ⇒ Object
Returns the value of attribute first.
9 10 11 |
# File 'lib/delayer/extend.rb', line 9 def first @first end |
#last ⇒ Object
Returns the value of attribute last.
9 10 11 |
# File 'lib/delayer/extend.rb', line 9 def last @last end |
#priority_of ⇒ Object
Returns the value of attribute priority_of.
9 10 11 |
# File 'lib/delayer/extend.rb', line 9 def priority_of @priority_of end |
#stashed ⇒ Object
Returns the value of attribute stashed.
9 10 11 |
# File 'lib/delayer/extend.rb', line 9 def stashed @stashed end |
Instance Method Details
#stash_size ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/delayer/extend.rb', line 18 def stash_size s = stashed if s 1 + s.stash_size else 0 end end |