Sha256: 642d65a3c65c982b2361cb5e98247705f540ec458e4b51ab785aaf107ccadd22

Contents?: true

Size: 571 Bytes

Versions: 2

Compression:

Stored size: 571 Bytes

Contents

module Caramelize
  module Services
    class PageBuilder
      def self.build_namespace_overview(namespaces)
        body = "## Overview of namespaces\n\n"

        namespaces.each do |namespace|
          # TODO change wiki as configurable default home
          # TODO support other markup syntaxes
          body << "* [[#{namespace[:name]}|#{namespace[:identifier]}/Wiki]]  \n"
        end

        Page.new(title: "Home",
                 body: body,
                 message: 'Create Namespace Overview',
                 latest: true)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
caramelize-1.0.0 lib/caramelize/services/page_builder.rb
caramelize-0.4.0 lib/caramelize/services/page_builder.rb