Sha256: 25ef1da4092a3e1f2981480907286c08cced5c5623ddf8d50d8a4f805227b6d1

Contents?: true

Size: 716 Bytes

Versions: 6

Compression:

Stored size: 716 Bytes

Contents

class Lono::Extensions
  module Loader
    include Lono::Template::Context::Loader::LoadFiles

    def load_all_extension_helpers
      Lono::Jade::Registry.tracked_extensions.each do |registry|
        load_extension_helpers(registry)
      end
    end

    def load_extension_helpers(registry)
      root = find_extensions_root_path(registry)
      helpers_path = "#{root}/lib/#{registry.name}/helpers"

      load_files(helpers_path)
    end

    #
    #     1. vendor/extensions
    #     2. normal gem
    #     3. materialized gem
    #
    def find_extensions_root_path(registry)
      @finder ||= Lono::Finder::Extension.new
      jadespec = @finder.find(registry.name)
      jadespec.root
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lono-7.3.2 lib/lono/extensions/loader.rb
lono-7.3.1 lib/lono/extensions/loader.rb
lono-7.3.0 lib/lono/extensions/loader.rb
lono-7.2.3 lib/lono/extensions/loader.rb
lono-7.2.2 lib/lono/extensions/loader.rb
lono-7.2.1 lib/lono/extensions/loader.rb