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
denisdefreyne opened this issue May 10, 2015 · 3 comments
Closed

View API lacks useful methods #570

denisdefreyne opened this issue May 10, 2015 · 3 comments

Comments

@denisdefreyne
Copy link
Member

  • 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.
@denisdefreyne
Copy link
Member Author

Idea: AttributesView that wraps attributes.

@cdlm
Copy link
Contributor

cdlm commented May 10, 2015

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

@denisdefreyne
Copy link
Member Author

See fix in #572.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants