Class: EhbrsRubyUtils::CircularListSpreader::ItemLevel
- Inherits:
-
Object
- Object
- EhbrsRubyUtils::CircularListSpreader::ItemLevel
show all
- Includes:
- BaseLevel
- Defined in:
- lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb
Instance Method Summary
collapse
Methods included from BaseLevel
#<=>, #debugs, #remaining?, #remaining_f, #remaining_fs
Instance Method Details
#label ⇒ Object
15
16
17
|
# File 'lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb', line 15
def label
item.to_s
end
|
#pop ⇒ Object
19
20
21
22
23
24
|
# File 'lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb', line 19
def pop
raise 'Item already removed' if removed?
self.removed = true
self
end
|
#remaining_i ⇒ Object
26
27
28
|
# File 'lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb', line 26
def remaining_i
removed? ? 0 : 1
end
|
#removed? ⇒ Boolean
30
31
32
|
# File 'lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb', line 30
def removed?
@removed
end
|
#total_i ⇒ Object
34
35
36
|
# File 'lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb', line 34
def total_i
1
end
|