Class: Avm::Registry::SourceGenerators

Inherits:
FromGems show all
Defined in:
lib/avm/registry/source_generators.rb

Instance Method Summary collapse

Methods inherited from FromGems

#available, #detect, #detect_optional, #provider_module_suffix, #single_module_suffix, #valid_registered_module?

Methods inherited from Base

#available, #to_s

Instance Method Details

#class_detect(klass, detect_args) ⇒ Avm::Instances::Base?

Returns:



7
8
9
10
11
# File 'lib/avm/registry/source_generators.rb', line 7

def class_detect(klass, detect_args)
  detect_args = detect_args.dup
  stereotype_name = detect_args.shift
  klass.application_stereotype.name == stereotype_name ? klass.new(*detect_args) : nil
end