Class: Avm::Registry::Instances

Inherits:
FromGems
  • Object
show all
Defined in:
lib/avm/registry/instances.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
# File 'lib/avm/registry/instances.rb', line 10

def class_detect(klass, detect_args)
  r = ::Avm::Instances::Base.by_id(*detect_args)
  r.application.stereotype.instance_class == klass ? klass.by_id(*detect_args) : nil
end