module T::Props::Plugin::Private

Public Class Methods

apply_class_methods(plugin, target) click to toggle source

These need to be non-instance methods so we can use them without prematurely creating the child decorator in `model_inherited` (see comments there for details).

The dynamic constant access below forces this file to be `typed: false`

# File lib/types/props/plugin.rb, line 21
def self.apply_class_methods(plugin, target)
  if plugin.const_defined?('ClassMethods')
    # FIXME: This will break preloading, selective test execution, etc if `mod::ClassMethods`
    # is ever defined in a separate file from `mod`.
    target.extend(plugin::ClassMethods)
  end
end
apply_decorator_methods(plugin, target) click to toggle source
# File lib/types/props/plugin.rb, line 29
def self.apply_decorator_methods(plugin, target)
  if plugin.const_defined?('DecoratorMethods')
    # FIXME: This will break preloading, selective test execution, etc if `mod::DecoratorMethods`
    # is ever defined in a separate file from `mod`.
    target.extend(plugin::DecoratorMethods)
  end
end