Sha256: 5484d52783ec53b50ffab8078593b42705dbaed39809634e78be3d1d42422255

Contents?: true

Size: 476 Bytes

Versions: 6

Compression:

Stored size: 476 Bytes

Contents

# Built-in helpers for the DSL form
class Lono::Template::Strategy::Dsl::Builder
  module Helpers
    extend Memoist

    # Auto include all modules in helpers folder
    helpers_dir = File.expand_path("helpers", __dir__)
    Dir.glob("#{helpers_dir}/**/*").each do |path|
      next unless File.file?(path)
      klass = path.gsub(%r{.*/lib/},'').sub(".rb",'').camelize
      include klass.constantize
    end

    include Lono::Template::Strategy::Common::Helpers
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lono-7.5.2 lib/lono/template/strategy/dsl/builder/helpers.rb
lono-7.5.1 lib/lono/template/strategy/dsl/builder/helpers.rb
lono-7.5.0 lib/lono/template/strategy/dsl/builder/helpers.rb
lono-7.4.11 lib/lono/template/strategy/dsl/builder/helpers.rb
lono-7.4.10 lib/lono/template/strategy/dsl/builder/helpers.rb
lono-7.4.9 lib/lono/template/strategy/dsl/builder/helpers.rb