Class: Coopy::IndexItem
- Inherits:
-
Object
- Object
- Coopy::IndexItem
- Defined in:
- lib/coopy/index_item.rb
Instance Attribute Summary collapse
-
#lst ⇒ Object
Array<Int>.
Instance Method Summary collapse
- #add(i) ⇒ Object
-
#initialize ⇒ IndexItem
constructor
A new instance of IndexItem.
Constructor Details
#initialize ⇒ IndexItem
Returns a new instance of IndexItem.
6 7 8 |
# File 'lib/coopy/index_item.rb', line 6 def initialize @lst = [] end |
Instance Attribute Details
#lst ⇒ Object
Array<Int>
4 5 6 |
# File 'lib/coopy/index_item.rb', line 4 def lst @lst end |
Instance Method Details
#add(i) ⇒ Object
10 11 12 13 14 |
# File 'lib/coopy/index_item.rb', line 10 def add(i) @lst ||= [] @lst << i @lst.length end |