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

Make helpers available in subclasses #1665

Merged

Conversation

pablonahuelgomez
Copy link
Contributor

@pablonahuelgomez pablonahuelgomez commented Jul 23, 2017

Updating settings code to define :top_level_setting with parent's
:inheritable_setting when available. This will emulate inheritance,
with its expected capabilities (sharing and overriding).

This fixes #1617

Updating settings code to define :top_level_setting with parent's
:inheritable_setting when available. This will emulate inheritance,
with its expected capabilities (sharing and overriding).
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect. I have a cosmetic function name amend if you can please and I'll merge?


# Obtains the current class :inheritable_setting. If available, it returns the superclass's :inheritable_setting.
# Otherwise, a clean :inheritable_setting is returned.
def obtain_top_level_setting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love the obtain name, maybe just get, another more common variation is build?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! Updated in 1a3ba3f

@dblock dblock merged commit 2c4d574 into ruby-grape:master Jul 24, 2017
@dblock
Copy link
Member

dblock commented Jul 24, 2017

Merged, thank you.

@pablonahuelgomez pablonahuelgomez deleted the make-helpers-available-in-subclasses branch July 25, 2017 00:53
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.

Helpers are not being inherited from parent classes
2 participants