Sha256: ebb77fe1f812024f7244a7f63d70830a9fea237ca3303e68b9ad2551b890e331

Contents?: true

Size: 1.31 KB

Versions: 4

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

require 'active_support/core_ext/hash'
require 'blocks/helpers/view_extensions'
require 'blocks/helpers/controller_extensions'

module Blocks
  extend ActiveSupport::Autoload

  # The following classes have no direct references when loading the rest
  #  of the Blocks classes so they must be eager loaded to prevent them
  #  from having to be loaded during the request
  #  (http://blog.plataformatec.com.br/2012/08/eager-loading-for-greater-good/)
  eager_autoload do
    autoload_under 'builders' do
      autoload :BlockDefinition
    end

    autoload_under 'renderers' do
      autoload :RuntimeContext
      autoload :BlockPlaceholder
    end
  end

  autoload_under 'renderers' do
    autoload :Renderer
    autoload :PartialRenderer
    autoload :BlockWithHooksRenderer
    autoload :AdjacentBlocksRenderer
    autoload :NestingBlocksRenderer
    autoload :CollectionRenderer
    autoload :WrapperRenderer
    autoload :BlockRenderer
  end

  autoload_under 'builders' do
    autoload :Builder
    autoload :HookDefinition
  end

  autoload_under 'utilities' do
    autoload :Configurator
    autoload :OptionsSet
    autoload :HashWithRenderStrategy
    autoload :HashWithCaller
  end

  autoload_under 'helpers' do
    autoload :HamlCapture
  end

  include Configurator
end

require 'blocks/engine'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blocks-4.0.1 lib/blocks.rb
blocks-4.0.0 lib/blocks.rb
blocks-4.0.0.rc2 lib/blocks.rb
blocks-4.0.0.rc1 lib/blocks.rb