Sha256: fa25e214f0a0d379f225625509fe88db676181d457bcd1d59b522f43f0d68282

Contents?: true

Size: 571 Bytes

Versions: 12

Compression:

Stored size: 571 Bytes

Contents

module Apidoco
  module ApplicationHelper
    def documentation_versions(version_parser)
      version_parser.documentations.map do |documentation|
        { name: documentation.name, path: api_path(id: documentation.name) }
      end
    end

    def build_documentation_array(documentations)
      documentation_array = documentations.map do |documentation|
        if documentation[:is_folder]
          build_documentation_array(documentation[:children])
        else
          documentation
        end
      end

      documentation_array.flatten
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
apidoco-1.6.4 app/helpers/apidoco/application_helper.rb
apidoco-1.6.3 app/helpers/apidoco/application_helper.rb
apidoco-1.6.2 app/helpers/apidoco/application_helper.rb
apidoco-1.6.1 app/helpers/apidoco/application_helper.rb
apidoco-1.6.0 app/helpers/apidoco/application_helper.rb
apidoco-1.5.6 app/helpers/apidoco/application_helper.rb
apidoco-1.5.5 app/helpers/apidoco/application_helper.rb
apidoco-1.5.4 app/helpers/apidoco/application_helper.rb
apidoco-1.5.3 app/helpers/apidoco/application_helper.rb
apidoco-1.5.2 app/helpers/apidoco/application_helper.rb
apidoco-1.5.1 app/helpers/apidoco/application_helper.rb
apidoco-1.5.0 app/helpers/apidoco/application_helper.rb