Sha256: 0fa41bcca7addb1b6a43713b76b485fa7cda034907e271d681b0bef10b00dd78

Contents?: true

Size: 963 Bytes

Versions: 12

Compression:

Stored size: 963 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_definition
    end

    alias scontroller   swagger_controller
    alias sdoc          swagger_doc
    alias sdefinition   swagger_definition
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
swagger_docs_generator-0.4.0 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.6 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.6.pre.34 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.5 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.5.pre.31 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.4.pre.26 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.4 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.4.pre.23 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.3 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.2 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.1 lib/swagger_docs_generator/methods.rb
swagger_docs_generator-0.3.0.pre.19 lib/swagger_docs_generator/methods.rb