class ActiveSupport::CodeGenerator
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/active_support/code_generator.rbs class ActiveSupport::CodeGenerator def batch: ((ActiveSupport::CodeGenerator | Module) owner, String path, Integer line) -> Concurrent::Map def define_cached_method: (String name, namespace: Symbol, as: String, ) -> Symbol def execute: () -> untyped end
:nodoc:
def batch(owner, path, line)
Experimental RBS support (using type sampling data from the type_fusion
project).
def batch: ((ActiveSupport::CodeGenerator | Module) owner, String path, Integer line) -> Concurrent::Map
This signature was generated using 9 samples from 2 applications.
def batch(owner, path, line) if owner.is_a?(CodeGenerator) yield owner else instance = new(owner, path, line) result = yield instance instance.execute result end end
def define_cached_method(name, namespace:, as: name, &block)
Experimental RBS support (using type sampling data from the type_fusion
project).
def define_cached_method: (String name, namespace: Symbol, as: String, ) -> Symbol
This signature was generated using 160 samples from 3 applications.
def define_cached_method(name, namespace:, as: name, &block) @namespaces[namespace].define_cached_method(name, as: as, &block) end
def execute
Experimental RBS support (using type sampling data from the type_fusion
project).
def execute: () -> untyped
This signature was generated using 2 samples from 1 application.
def execute @namespaces.each_value do |method_set| method_set.apply(@owner, @path, @line - 1) end end
def initialize(owner, path, line)
def initialize(owner, path, line) @owner = owner @path = path @line = line @namespaces = Hash.new { |h, k| h[k] = MethodSet.new(k) } end