Class: Fictium::OpenApi::V3Exporter::PathGenerator
- Inherits:
-
Object
- Object
- Fictium::OpenApi::V3Exporter::PathGenerator
- Defined in:
- lib/fictium/exporters/open_api/v3_exporter/path_generator.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(document) ⇒ PathGenerator
constructor
A new instance of PathGenerator.
Constructor Details
#initialize(document) ⇒ PathGenerator
Returns a new instance of PathGenerator.
7 8 9 |
# File 'lib/fictium/exporters/open_api/v3_exporter/path_generator.rb', line 7 def initialize(document) @document = document end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
5 6 7 |
# File 'lib/fictium/exporters/open_api/v3_exporter/path_generator.rb', line 5 def document @document end |
Instance Method Details
#generate ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/fictium/exporters/open_api/v3_exporter/path_generator.rb', line 11 def generate {}.tap do |paths| document.resources.each do |resource| generate_from_resource(paths, resource) end end end |