Class: SwaggerInfo
- Inherits:
-
Object
- Object
- SwaggerInfo
- Defined in:
- lib/rat_pack_swagger.rb
Instance Method Summary collapse
- #contact(app_contact) ⇒ Object
- #description(app_description) ⇒ Object
-
#initialize(&block) ⇒ SwaggerInfo
constructor
A new instance of SwaggerInfo.
- #title(app_title) ⇒ Object
- #to_hash ⇒ Object
- #version(app_version) ⇒ Object
Constructor Details
#initialize(&block) ⇒ SwaggerInfo
Returns a new instance of SwaggerInfo.
4 5 6 |
# File 'lib/rat_pack_swagger.rb', line 4 def initialize(&block) instance_eval &block end |
Instance Method Details
#contact(app_contact) ⇒ Object
20 21 22 |
# File 'lib/rat_pack_swagger.rb', line 20 def contact(app_contact) @contact = app_contact end |
#description(app_description) ⇒ Object
12 13 14 |
# File 'lib/rat_pack_swagger.rb', line 12 def description(app_description) @description = app_description end |
#title(app_title) ⇒ Object
8 9 10 |
# File 'lib/rat_pack_swagger.rb', line 8 def title(app_title) @title = app_title end |
#to_hash ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rat_pack_swagger.rb', line 24 def to_hash { title: @title, description: @description, version: @version, contact: { name: @contact[:name], email: @contact[:email] } } end |
#version(app_version) ⇒ Object
16 17 18 |
# File 'lib/rat_pack_swagger.rb', line 16 def version(app_version) @version = app_version end |