Class: Apipie::DSL::ResourceDescriptionDsl
- Inherits:
-
Object
- Object
- Apipie::DSL::ResourceDescriptionDsl
- Defined in:
- lib/apipie/dsl_definition.rb
Instance Attribute Summary
Attributes included from Base
#api_params, #apipie_resource_descriptions
Class Method Summary collapse
-
.eval_dsl(controller, &block) ⇒ Object
evaluates resource description DSL and returns results.
Instance Method Summary collapse
-
#initialize(controller) ⇒ ResourceDescriptionDsl
constructor
A new instance of ResourceDescriptionDsl.
Methods included from Param
#_default_param_group_scope, #param, #param_group, #property, #returns
Methods included from Resource
#api_base_url, #app_info, #deprecated, #name, #path, #resource_id, #short
Methods included from Common
#_apipie_define_validators, #_apipie_get_method_params, #_apipie_handle_validate_key_error, #_apipie_save_method_params, #api_versions, #desc, #document, #error, #formats, #header, #meta, #tags
Methods included from Base
Constructor Details
#initialize(controller) ⇒ ResourceDescriptionDsl
Returns a new instance of ResourceDescriptionDsl.
618 619 620 |
# File 'lib/apipie/dsl_definition.rb', line 618 def initialize(controller) @controller = controller end |
Class Method Details
.eval_dsl(controller, &block) ⇒ Object
evaluates resource description DSL and returns results
623 624 625 626 627 628 629 |
# File 'lib/apipie/dsl_definition.rb', line 623 def self.eval_dsl(controller, &block) dsl_data = self.new(controller)._apipie_eval_dsl(&block) if dsl_data[:api_versions].empty? dsl_data[:api_versions] = Apipie.controller_versions(controller) end dsl_data end |