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.



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

#firstObject

Returns the value of attribute first.



9
10
11
# File 'lib/delayer/extend.rb', line 9

def first
  @first
end

#lastObject

Returns the value of attribute last.



9
10
11
# File 'lib/delayer/extend.rb', line 9

def last
  @last
end

#priority_ofObject

Returns the value of attribute priority_of.



9
10
11
# File 'lib/delayer/extend.rb', line 9

def priority_of
  @priority_of
end

#stashedObject

Returns the value of attribute stashed.



9
10
11
# File 'lib/delayer/extend.rb', line 9

def stashed
  @stashed
end

Instance Method Details

#stash_sizeObject



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