Sha256: 25b0b649543e4eec38ba56806ebff1aeeafc4d8cbecbf1b8cf03f8174ce2936b
Contents?: true
Size: 830 Bytes
Versions: 11
Compression:
Stored size: 830 Bytes
Contents
# frozen_string_literal: true module ThinkFeelDoEngine module Reports # Helper methods for reporting on modules. # rubocop:disable Lint/NestedMethodDefinition module ToolModule URL_ROOT_RE = %r{^[^\/]*\/\/[^\/]+} def self.included(klass) class << klass # Returns a hash mapping path to Tool Module. def modules_map tool_modules.each_with_object({}) do |m, h| h[url_helpers.navigator_location_path(module_id: m.id)] = m end end private def tool_modules BitCore::ContentModule.where(type: nil) end def url_helpers ThinkFeelDoEngine::Engine.routes.url_helpers end end end end # rubocop:enable Lint/NestedMethodDefinition end end
Version data entries
11 entries across 11 versions & 1 rubygems