Module: Vedeu::Repositories::Assemblage Private

Includes:
Enumerable
Included in:
Editor::Collection, Collection
Defined in:
lib/vedeu/repositories/assemblage.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Provides collection related query/command methods.

Instance Method Summary collapse

Instance Method Details

#[](index) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Return an individual element or collection of elements (if the given index is a Range).

Parameters:

  • index (Fixnum|Range)


20
21
22
# File 'lib/vedeu/repositories/assemblage.rb', line 20

def [](index)
  collection[index]
end

#any?(&block) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a boolean indicating whether the collection is not empty.

Parameters:

  • block (Proc)

Returns:



29
30
31
# File 'lib/vedeu/repositories/assemblage.rb', line 29

def any?(&block)
  collection.any?(&block)
end

#each(&block) ⇒ Enumerator

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Provides iteration over the collection.

Parameters:

  • block (Proc)

Returns:

  • (Enumerator)


37
38
39
# File 'lib/vedeu/repositories/assemblage.rb', line 37

def each(&block)
  collection.each(&block)
end

#empty?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a boolean indicating whether the collection is empty.

Returns:



44
45
46
# File 'lib/vedeu/repositories/assemblage.rb', line 44

def empty?
  collection.empty?
end

#eql?(other) ⇒ Boolean Also known as: ==

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

An object is equal when its values are the same.

Parameters:

  • other (void)

Returns:



52
53
54
# File 'lib/vedeu/repositories/assemblage.rb', line 52

def eql?(other)
  self.class.equal?(other.class) && collection == other.collection
end

#sizeFixnum

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return the size of the collection.

Returns:

  • (Fixnum)


60
61
62
# File 'lib/vedeu/repositories/assemblage.rb', line 60

def size
  collection.size
end