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 1 commit into from May 15, 2015


None yet
1 participant

ddfreyne commented May 15, 2015

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.

Make ItemArray more of a generic collection
An item collection is not inherently an array (it is not ordered). The
API now reflects this.

ddfreyne added a commit that referenced this pull request May 15, 2015

@ddfreyne ddfreyne merged commit 574edbe into master May 15, 2015

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress

@ddfreyne ddfreyne deleted the fix-item-array branch May 15, 2015

@ddfreyne ddfreyne 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