Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Nanoc::Int::ItemArray #582

Merged
merged 1 commit into from May 15, 2015
Merged

Improve Nanoc::Int::ItemArray #582

merged 1 commit into from May 15, 2015

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.

None yet

1 participant