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
-
#[](index) ⇒ void
private
Return an individual element or collection of elements (if the given index is a Range).
-
#any?(&block) ⇒ Boolean
private
Returns a boolean indicating whether the collection is not empty.
-
#each(&block) ⇒ Enumerator
private
Provides iteration over the collection.
-
#empty? ⇒ Boolean
private
Returns a boolean indicating whether the collection is empty.
-
#eql?(other) ⇒ Boolean
(also: #==)
private
An object is equal when its values are the same.
-
#size ⇒ Fixnum
private
Return the size of the collection.
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).
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.
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.
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.
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.
52 53 54 |
# File 'lib/vedeu/repositories/assemblage.rb', line 52 def eql?(other) self.class.equal?(other.class) && collection == other.collection end |
#size ⇒ Fixnum
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.
60 61 62 |
# File 'lib/vedeu/repositories/assemblage.rb', line 60 def size collection.size end |