Sha256: 67e2b0638d96d17c337b780a41ddb016f328e8f4ce6a8e1d5592eaaaf1a1e1b2

Contents?: true

Size: 440 Bytes

Versions: 5

Compression:

Stored size: 440 Bytes

Contents

require_dependency "apidoco/application_controller"

module Apidoco
  class ApisController < ApplicationController
    before_action :set_version_parser

    def index
      redirect_to api_path(id: @vp.documentations.first.name)
    end

    def show
      @documentation = @vp.documentation(params[:id])
      @data = @documentation.as_json
    end

    private

    def set_version_parser
      @vp = VersionParser.new
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
apidoco-1.2.0 app/controllers/apidoco/apis_controller.rb
apidoco-1.1.0 app/controllers/apidoco/apis_controller.rb
apidoco-1.0.2 app/controllers/apidoco/apis_controller.rb
apidoco-1.0.1 app/controllers/apidoco/apis_controller.rb
apidoco-0.1.0 app/controllers/apidoco/apis_controller.rb