Module: Apipie::DSL::Resource
- Included in:
- ResourceDescriptionDsl
- Defined in:
- lib/apipie/dsl_definition.rb
Instance Method Summary collapse
- #api_base_url(url) ⇒ Object
- #app_info(app_info) ⇒ Object
- #deprecated(value) ⇒ Object
- #name(name) ⇒ Object
- #path(path) ⇒ Object
-
#resource_id(resource_id) ⇒ Object
by default, the resource id is derived from controller_name it can be overwritten with.
- #short(short) ⇒ Object (also: #short_description)
Instance Method Details
#api_base_url(url) ⇒ Object
66 67 68 |
# File 'lib/apipie/dsl_definition.rb', line 66 def api_base_url(url) _apipie_dsl_data[:api_base_url] = url end |
#app_info(app_info) ⇒ Object
79 80 81 |
# File 'lib/apipie/dsl_definition.rb', line 79 def app_info(app_info) _apipie_dsl_data[:app_info] = app_info end |
#deprecated(value) ⇒ Object
83 84 85 |
# File 'lib/apipie/dsl_definition.rb', line 83 def deprecated(value) _apipie_dsl_data[:deprecated] = value end |
#name(name) ⇒ Object
62 63 64 |
# File 'lib/apipie/dsl_definition.rb', line 62 def name(name) _apipie_dsl_data[:resource_name] = name end |
#path(path) ⇒ Object
75 76 77 |
# File 'lib/apipie/dsl_definition.rb', line 75 def path(path) _apipie_dsl_data[:path] = path end |
#resource_id(resource_id) ⇒ Object
by default, the resource id is derived from controller_name it can be overwritten with.
resource_id "my_own_resource_id"
58 59 60 |
# File 'lib/apipie/dsl_definition.rb', line 58 def resource_id(resource_id) Apipie.set_resource_id(@controller, resource_id) end |
#short(short) ⇒ Object Also known as: short_description
70 71 72 |
# File 'lib/apipie/dsl_definition.rb', line 70 def short(short) _apipie_dsl_data[:short_description] = short end |