Class: Collection::Array

Inherits:
Object
  • Object
show all
Includes:
Collection
Defined in:
lib/collection/array.rb

Instance Attribute Summary

Attributes included from Collection

#type_parameter

Instance Method Summary collapse

Methods included from Collection

#==, Array, Set, #add, #clear, #each, #empty?, included, #initialize

Instance Method Details

#contentObject



5
6
7
# File 'lib/collection/array.rb', line 5

def content
  @content ||= ::Array.new
end

#lastObject



9
10
11
# File 'lib/collection/array.rb', line 9

def last
  content.last
end

#lengthObject Also known as: size



13
14
15
# File 'lib/collection/array.rb', line 13

def length
  count
end