Class: Webspicy::Web::Openapi::Generator
- Inherits:
-
Object
- Object
- Webspicy::Web::Openapi::Generator
- Defined in:
- lib/webspicy/web/openapi/generator.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#generator ⇒ Object
readonly
Returns the value of attribute generator.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(config) ⇒ Generator
Returns a new instance of Generator.
8 9 10 11 |
# File 'lib/webspicy/web/openapi/generator.rb', line 8 def initialize(config) @config = Configuration.dress(config) @generator = config.generator || Finitio::Generation.new end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/webspicy/web/openapi/generator.rb', line 12 def config @config end |
#generator ⇒ Object (readonly)
Returns the value of attribute generator.
12 13 14 |
# File 'lib/webspicy/web/openapi/generator.rb', line 12 def generator @generator end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/webspicy/web/openapi/generator.rb', line 14 def call { openapi: "3.0.2", info: { version: "1.0.0", title: "Hello API" }, paths: paths } end |