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

View API lacks useful methods #570

Closed
ddfreyne opened this issue May 10, 2015 · 3 comments
Closed

View API lacks useful methods #570

ddfreyne opened this issue May 10, 2015 · 3 comments

Comments

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented May 10, 2015

  • ConfigView
    • #fetch (like Hash#fetch)
    • #key? (like Hash#key?)
  • ItemView
    • #fetch (like Hash#fetch)
    • #key? (like Hash#key?)
    • #parent (like Nanoc::Int::Item#parent)
  • MutableItemView
    • #update_attributes to bulk update attributes
  • MutableItemCollectionView
    • #concat to bulk add items

Other related changes:

  • items.create must return nil, so that it does not expose the internal entity.
@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented May 10, 2015

Idea: AttributesView that wraps attributes.

@cdlm
Copy link
Contributor

@cdlm cdlm commented May 10, 2015

Idea: a mixin that implements the rest of the Hash protocol, when you need objects that are like hashes.

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented May 11, 2015

See fix in #572.

@ddfreyne ddfreyne closed this May 11, 2015
@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
@ddfreyne ddfreyne removed this from the 4.0.0 milestone Jun 20, 2015
@ddfreyne ddfreyne removed this from the 4.0.0 milestone Jun 20, 2015
@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants