-
Notifications
You must be signed in to change notification settings - Fork 21
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
Include namespaces #21
Conversation
@AlessandroMinali what do you think? |
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.
Comprehensive specs 👍 Looks good besides my one nitpick on the error
This does not have anything to do directly with this but something that came into my head while reading the changes/code: I wonder if there is a way which can greatly reduce the amount of copy and pasting of params between methods. Maybe building an object/Struct when the API is called to store the opts and calling the inner methods on that so we don't need to keep juggling things around. Something to think about and probably better tackled in the other refactor issue
lib/surrealist/string_utils.rb
Outdated
# | ||
# @return [Hash] a nested hash. | ||
def break_namespaces(klass, camelize:, nesting_level:) | ||
Surrealist::ExceptionRaiser.raise_invalid_nesting_level! if nesting_level.zero? |
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.
How about error on less than zero and not a Integer
@AlessandroMinali yep, you are right, I've also thought about it and I guess this needs to be done. We already have an issue for |
#14