Sha256: da8e00706fc93f949afed9cc77517c186e1c44614655a98c07f3d86cdec282c1

Contents?: true

Size: 1.16 KB

Versions: 2

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

# :reek:UtilityFunction
module SwaggerDocsGenerator
  # # Methods for controller
  #
  # Methods adding to controller parsing in rails appliation
  module Methods
    # Create json file for controller. Create all temporary file for each
    # controller.
    def swagger_controller(description)
      parse = ParserController.new(description)
      parse.adding_tag
    end

    # Complete json file with datas to method and controller. Each action to
    # controller is writing in temporary file.
    def swagger_doc(action, &block)
      parse = ParserAction.new(action, &block)
      parse.adding_path
    end

    # Complete definitions objects for each controller.
    def swagger_definition(name, &block)
      parse = ParserDefinition.new(name, &block)
      parse.adding_definition
    end

    # Create section for display a README in top to documentation
    def swagger_readme(readme_file)
      parse = ParserReadme.new(readme_file)
      parse.adding_readme
    end

    alias scontroller   swagger_controller
    alias sdoc          swagger_doc
    alias sdefinition   swagger_definition
    alias sreadme       swagger_readme
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
swagger_docs_generator-0.5.1 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.5.0.pre.42 lib/swagger_docs_generator/methods.rb