Sha256: 4c9d086e28af0fbb37b1018d93581a60f1f3655c80027a231fea019c7eaa9a3e

Contents?: true

Size: 982 Bytes

Versions: 1

Compression:

Stored size: 982 Bytes

Contents

# frozen_string_literal: true

require "hescape"
require "zeitwerk"
require "syntax_tree"

module Phlex
	Loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false).tap do |loader|
		loader.ignore("#{__dir__}/generators")
		loader.ignore("#{__dir__}/install")

		loader.ignore("#{__dir__}/phlex/testing")

		loader.ignore("#{__dir__}/phlex/rails.rb")
		loader.ignore("#{__dir__}/phlex/rails")

		loader.inflector.inflect("html" => "HTML")
		loader.inflector.inflect("vcall" => "VCall")
		loader.inflector.inflect("fcall" => "FCall")
		loader.setup
	end

	Error = Module.new
	ArgumentError = Class.new(ArgumentError) { include Error }
	NameError = Class.new(NameError) { include Error }

	def self.const_missing(name)
		if name == :View
			raise NameError, "👋 Phlex::View has been renamed (again 🙄) to Phlex::HTML."
		end
	end

	extend self

	ATTRIBUTE_CACHE = {}

	def configuration
		@configuration ||= Configuration.new
	end

	def configure
		yield configuration
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phlex-0.5.0 lib/phlex.rb