Sha256: 86c879d1fbdb6f35ecc0d9c38f08724ae266637b5b740792697aaba9b765f42e

Contents?: true

Size: 962 Bytes

Versions: 4

Compression:

Stored size: 962 Bytes

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_defintion
    end

    alias scontroller   swagger_controller
    alias sdoc          swagger_doc
    alias sdefinition   swagger_definition
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
swagger_docs_generator-0.3.0.pre.18 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.2.0 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.2.0.pre.14 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.2.0.pre.13 lib/swagger_docs_generator/methods.rb