Class: CollectionDrop

Inherits:
Liquid::Drop
  • Object
show all
Includes:
Enumerable
Defined in:
app/drops/collection_drop.rb

Overview

This drop is the return type of many methods in other drops. These methods can be used to fetch required data from the returned data accordingly. Like to get the number of comments from a method returning CollectionDrop you can use #count or #size method.

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)

#countInteger

Returns:

  • (Integer)

#each(&block) ⇒ Array

Returns:

  • (Array)

#firstObject

Returns:

  • (Object)

#lastObject

Returns:

  • (Object)

#latestObject

Returns:

  • (Object)

#sizeInteger

Alias of count method

Returns:

  • (Integer)

#slice(offset, length) ⇒ Array

Returns:

  • (Array)