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.
9 10 11 12 13 14 |
# File 'lib/delayer/extend.rb', line 9 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.
7 8 9 |
# File 'lib/delayer/extend.rb', line 7 def first @first end |
#last ⇒ Object
Returns the value of attribute last.
7 8 9 |
# File 'lib/delayer/extend.rb', line 7 def last @last end |
#priority_of ⇒ Object
Returns the value of attribute priority_of.
7 8 9 |
# File 'lib/delayer/extend.rb', line 7 def priority_of @priority_of end |
#stashed ⇒ Object
Returns the value of attribute stashed.
7 8 9 |
# File 'lib/delayer/extend.rb', line 7 def stashed @stashed end |
Instance Method Details
#stash_size ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/delayer/extend.rb', line 16 def stash_size s = stashed if s 1 + s.stash_size else 0 end end |