Sha256: bb58fa8f3dc39993c3cb4f0653a62d08b0df3fd9cb92a10504b409d82c8c4468
Contents?: true
Size: 791 Bytes
Versions: 5
Compression:
Stored size: 791 Bytes
Contents
require 'pathname' require 'rom/support/inflector' require 'rom/types' require 'rom/setup/auto_registration_strategies/base' module ROM module AutoRegistrationStrategies # NoNamespace strategy assumes components are not defined within a namespace # # @api private class NoNamespace < Base # @!attribute [r] directory # @return [Pathname] The path to dir with components option :directory, type: PathnameType # @!attribute [r] entity # @return [Symbol] Component identifier option :entity, type: Types::Strict::Symbol # Load components # # @api private def call Inflector.camelize( file.sub(/^#{directory}\/#{entity}\//, '').sub(EXTENSION_REGEX, '') ) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems