Class: Delayer::Bucket

Inherits:
Object
  • Object
show all
Defined in:
lib/delayer/extend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#firstObject

Returns the value of attribute first.



7
8
9
# File 'lib/delayer/extend.rb', line 7

def first
  @first
end

#lastObject

Returns the value of attribute last.



7
8
9
# File 'lib/delayer/extend.rb', line 7

def last
  @last
end

#priority_ofObject

Returns the value of attribute priority_of.



7
8
9
# File 'lib/delayer/extend.rb', line 7

def priority_of
  @priority_of
end

#stashedObject

Returns the value of attribute stashed.



7
8
9
# File 'lib/delayer/extend.rb', line 7

def stashed
  @stashed
end

Instance Method Details

#stash_sizeObject



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