Module: DoctorSwagger::ClassMethods
- Defined in:
- lib/doctor_swagger.rb
Instance Method Summary collapse
- #api_version(version) ⇒ Object
- #base_path(url) ⇒ Object
- #swagger_doc ⇒ Object
- #swagger_resource(resource_path, &block) ⇒ Object
- #swagger_root_resource(resource_path, &block) ⇒ Object
- #swagger_version(version) ⇒ Object
Instance Method Details
#api_version(version) ⇒ Object
45 46 47 |
# File 'lib/doctor_swagger.rb', line 45 def api_version(version) @api_version = version end |
#base_path(url) ⇒ Object
49 50 51 |
# File 'lib/doctor_swagger.rb', line 49 def base_path(url) @base_path = url end |
#swagger_doc ⇒ Object
53 54 55 |
# File 'lib/doctor_swagger.rb', line 53 def swagger_doc @swagger_doc end |
#swagger_resource(resource_path, &block) ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/doctor_swagger.rb', line 57 def swagger_resource(resource_path, &block) @swagger_doc = SwaggerDoc.new(resource_path, :swagger_version => @swagger_version, :api_version => @api_version, :base_path => @base_path, &block) end |
#swagger_root_resource(resource_path, &block) ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/doctor_swagger.rb', line 65 def swagger_root_resource(resource_path, &block) @swagger_doc = RootSwaggerDoc.new(resource_path, :swagger_version => @swagger_version, :api_version => @api_version, :base_path => @base_path, &block) end |
#swagger_version(version) ⇒ Object
41 42 43 |
# File 'lib/doctor_swagger.rb', line 41 def swagger_version(version) @swagger_version = version end |