Skip to content

Conversation

denisdefreyne
Copy link
Member

Nanoc::Int::ItemArray is icky (too array-like, with too much magic delegation). This improves ItemArray to be more in line with the API that ItemCollectionView exposes.

  • Fix #[] with regex returning array
  • Remove anything non-essential
  • Remove #at
  • Remove #slice
  • Remove #+
  • Remove integer indexing
  • Remove #last

From the public API point of view, only the removal of #at, #[] returning an array, and integer indexing has changed.

Future work could include renaming ItemArray to ItemCollection, but for the sake of not diverging too much from 3.x, I’ll keep it this way for now.

An item collection is not inherently an array (it is not ordered). The
API now reflects this.
denisdefreyne added a commit that referenced this pull request May 15, 2015
Improve Nanoc::Int::ItemArray
@denisdefreyne denisdefreyne merged commit 574edbe into master May 15, 2015
@denisdefreyne denisdefreyne deleted the fix-item-array branch May 15, 2015 11:54
@denisdefreyne denisdefreyne modified the milestone: 4.0.0 Jun 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant