Module: Ecfr::DefaultDocumentationSetup::ClassMethods
- Defined in:
- lib/ecfr/default_documentation_setup.rb
Constant Summary collapse
- DOCUMENTATION_PATH =
"documentation.json"
Instance Method Summary collapse
- #api_documentation(args = {}) ⇒ Object
-
#documentation_config ⇒ Object
.documentation_config is provided to support use cases in which the user wants to construct their own handling of status checks, e.g.
Instance Method Details
#api_documentation(args = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/ecfr/default_documentation_setup.rb', line 6 def api_documentation(args = {}) perform( documentation_config[:method], DOCUMENTATION_PATH, params: args.compact ) end |
#documentation_config ⇒ Object
.documentation_config is provided to support use cases in which the user wants to construct their own handling of status checks, e.g. to wrap in custom errors or run in parallel
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ecfr/default_documentation_setup.rb', line 18 def documentation_config { url: [ base_url, service_path, "/#{DOCUMENTATION_PATH}" ].reject(&:blank?).join, method: :get } end |