Class: Avm::Registry::SourceGenerators

Inherits:
FromGems
  • Object
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, #to_s, #valid_registered_module?

Instance Method Details

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

Returns:



10
11
12
13
14
# File 'lib/avm/registry/source_generators.rb', line 10

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