-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cabinet memberships documentation #15616
Conversation
ddf3c73
to
46db2b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to put a PR through to rename memberships
to legislative_memberships
first before this one.
lib/person_cards.rb
Outdated
# @return [Array<EveryPolitician::Popolo::Membership>] | ||
def memberships | ||
def legislative_memberships |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look like it belongs here…
Have pulled that change into #15619 |
46db2b9
to
043a493
Compare
This documents the new (and currently unimplemented) `PersonCard#cabinet_memberships` method. This method will be used to return the cabinet memberships for the current person card.
These docs were originally put here when we thought we'd be adding some bits that would be more useful for external people. As it turns out we've ended up adding the logic to mostly internal classes for now, so we're documenting that in the classes themselves.
043a493
to
805a06a
Compare
Renaming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What does this do?
Updates the documentation for the cabinet memberships methods that was added in #15609 and moves it out of the README and into
lib/person_cards.rb
.Why was this needed?
Originally we thought this code might be useful to outside people, as it was augmenting the everypolitician-ruby gem. Now though, we've decided that it's best for the functionality to live in some viewer-sinatra specific classes for now, until we have a better idea of how it all fits together at least. So this moves the docs to a more logical place.
Relevant Issue(s)
Extracted from #15615
Follows on from #15609
Replaces #15612
Part of #24
Implementation notes
This uses the YARD
@example
documentation tag, which render the example code out in the docs, see screenshot below.Screenshots
Notes to Reviewer
This is just the documentation for now, the implementation will come as a separate pull request.