Class: Apipie::MethodDescription::ApisService
- Inherits:
-
Object
- Object
- Apipie::MethodDescription::ApisService
- Defined in:
- lib/apipie/method_description/apis_service.rb
Overview
Service that builds the appropriate Apipie::MethodDescription::Api required by Apipie::MethodDescription
Instance Method Summary collapse
- #call ⇒ Array<Apipie::MethodDescription::Api>
-
#initialize(resource, controller_action, dsl) ⇒ ApisService
constructor
A new instance of ApisService.
Constructor Details
#initialize(resource, controller_action, dsl) ⇒ ApisService
Returns a new instance of ApisService.
8 9 10 11 12 |
# File 'lib/apipie/method_description/apis_service.rb', line 8 def initialize(resource, controller_action, dsl) @resource = resource @controller_action = controller_action @dsl = dsl end |
Instance Method Details
#call ⇒ Array<Apipie::MethodDescription::Api>
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/apipie/method_description/apis_service.rb', line 15 def call api_args.map do |http_method, path, desc, opts| Apipie::MethodDescription::Api.new( http_method, concern_subst(path), concern_subst(desc), opts ) end end |