Module: Staticky::Pluggable

Included in:
Resources::Plugins, Routing::Plugins
Defined in:
lib/staticky/pluggable.rb

Defined Under Namespace

Modules: ClassMethods Classes: Resolver

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/staticky/pluggable.rb', line 25

def self.included(base)
  base.extend Dry::Container::Mixin
  base.extend ClassMethods
  base.config.resolver = Resolver.new(base)

  base.define_singleton_method :namespace do
    base.name.split("::")[0..-2].join("::")
  end
end