Skip to content

Commit 704eea8

Browse files
committed
Renamed to_h by settings
1 parent 7aac3a7 commit 704eea8

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* [#2549](https://github.com/ruby-grape/grape/pull/2549): Delegate cookies management to `Grape::Request` - [@ericproulx](https://github.com/ericproulx).
1212
* [#2554](https://github.com/ruby-grape/grape/pull/2554): Remove `Grape::Http::Headers` and `Grape::Util::Lazy::Object` - [@ericproulx](https://github.com/ericproulx).
1313
* [#2556](https://github.com/ruby-grape/grape/pull/2556): Remove unused `Grape::Request::DEFAULT_PARAMS_BUILDER` constant - [@eriklovmo](https://github.com/eriklovmo).
14+
* [#1](https://github.com/ericproulx/grape/pull/1): Refactor `desc` DSL - [@ericproulx](https://github.com/ericproulx).
1415
* Your contribution here.
1516

1617
#### Fixes

lib/grape/dsl/desc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def desc(description, options = {}, &config_block)
5454
settings =
5555
if config_block
5656
endpoint_config = defined?(configuration) ? configuration : nil
57-
Grape::Util::ApiDescription.new(description, endpoint_config, &config_block).to_h
57+
Grape::Util::ApiDescription.new(description, endpoint_config, &config_block).settings
5858
else
5959
options.merge(description: description)
6060
end

lib/grape/util/api_description.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def configuration
4040
@configuration ||= eval_endpoint_config(@endpoint_configuration)
4141
end
4242

43-
def to_h
43+
def settings
4444
@attributes
4545
end
4646

0 commit comments

Comments
 (0)