Skip to content

clean DSL module #1287

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

Merged
merged 1 commit into from
Feb 23, 2016
Merged

clean DSL module #1287

merged 1 commit into from
Feb 23, 2016

Conversation

totothink
Copy link

No description provided.

@dblock
Copy link
Member

dblock commented Feb 23, 2016

👍

dblock added a commit that referenced this pull request Feb 23, 2016
@dblock dblock merged commit 4032ea8 into ruby-grape:master Feb 23, 2016
@totothink
Copy link
Author

https://github.com/totothink/grape/blob/6a49d6c2086884770f9a322fa01d4fb3fd14c256/lib/grape/dsl/configuration.rb

      # Merge multiple layers of settings into one hash.
       def stacked_hash_to_hash(settings)
          return if settings.blank?
          settings.each_with_object({}) { |value, result| result.deep_merge!(value) }
        end

stacked_hash_to_hash method like procedural programming. It should serve as settings object method,you think?

@dblock
Copy link
Member

dblock commented Feb 23, 2016

@totothink Maybe ;)

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