Module: Grape::DSL::Desc
Instance Attribute Summary
Attributes included from Settings
#inheritable_setting, #top_level_setting
Instance Method Summary collapse
-
#desc(description, options = {}) { ... } ⇒ Object
Add a description to the next namespace or function.
Methods included from Settings
global_setting, namespace_setting, route_setting
Instance Method Details
#desc(description, options = {}) { ... } ⇒ Object
Add a description to the next namespace or function.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/grape/dsl/desc.rb', line 52 def desc(description, = {}, &config_block) settings = if config_block endpoint_config = defined?(configuration) ? configuration : nil Grape::Util::ApiDescription.new(description, endpoint_config, &config_block).settings else .merge(description: description) end inheritable_setting.namespace[:description] = settings inheritable_setting.route[:description] = settings end |