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

Add add_chapter() as alias for add_page() #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elebow
Copy link
Contributor

@elebow elebow commented Oct 12, 2019

This provides the option for a more natural-sounding API when generating books.

This provides the option for a more natural-sounding API when generating
books.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 98.214% when pulling 8b2423a on elebow:add-chapter-alias-for-add-page into 2555773 on anqxyr:master.

@anqxyr
Copy link
Owner

anqxyr commented Oct 12, 2019

Not totally sure about this one, will need to think a bit about it.

Either way, I don't like this class-level attribute assignment aliasing. If I end up merging it, I'll rewrite it as a proper method first.

@elebow
Copy link
Contributor Author

elebow commented Oct 14, 2019

My reasoning for preferring a class attribute for aliasing is that the method signature only has to be maintained in a single place. Any changes to the arguments of add_page() will be automatically reflected in the alias.

That said, here is a branch using a separate method, if you decide to merge the functionality: https://github.com/elebow/mkepub/commits/add-chapter-alias-for-add-page-method. I can update this PR if you'd like.

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

Successfully merging this pull request may close these issues.

3 participants