Class: Avm::Registry::FileFormats

Inherits:
FromGems
  • Object
show all
Defined in:
lib/avm/registry/file_formats.rb

Instance Method Summary collapse

Methods inherited from FromGems

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

Instance Method Details

#class_detect(klass, detect_args) ⇒ Avm::FileFormats::Base



10
11
12
# File 'lib/avm/registry/file_formats.rb', line 10

def class_detect(klass, detect_args)
  klass.new if klass.new.match?(detect_args.first)
end

#detect_optional(*registered_initialize_args) ⇒ Avm::FileFormats::Base, Avm::FileFormats::Unknown



15
16
17
# File 'lib/avm/registry/file_formats.rb', line 15

def detect_optional(*registered_initialize_args)
  super || ::Avm::FileFormats::Unknown.new
end