Module: ViennaRna::Package
- Defined in:
- lib/vienna_rna.rb,
lib/vienna_rna/package/base.rb,
lib/vienna_rna/package/eval.rb,
lib/vienna_rna/package/fold.rb,
lib/vienna_rna/package/heat.rb,
lib/vienna_rna/package/mfpt.rb,
lib/vienna_rna/package/xbor.rb,
lib/vienna_rna/package/fftbor.rb,
lib/vienna_rna/package/rnabor.rb,
lib/vienna_rna/package/subopt.rb,
lib/vienna_rna/package/fftbor2d.rb,
lib/vienna_rna/package/rna2dfold.rb,
lib/vienna_rna/package/energy_grid_2d.rb
Defined Under Namespace
Classes: Base, EnergyGrid2d, Eval, Fftbor, Fftbor2d, Fold, Heat, Mfpt, Rna2dfold, Rnabor, Subopt, Xbor
Class Method Summary
collapse
Class Method Details
.const_missing(name) ⇒ Object
30
31
32
33
34
35
36
37
38
|
# File 'lib/vienna_rna.rb', line 30
def self.const_missing(name)
if const_defined?(name)
const_get(name)
elsif Base.exec_exists?(name)
module_eval do
const_set(name, Class.new(Base))
end
end
end
|
.lookup(package_name) ⇒ Object
3
4
5
|
# File 'lib/vienna_rna/package/base.rb', line 3
def self.lookup(package_name)
const_missing("#{package_name}".camelize) || raise(ArgumentError.new("#{package_name} can't be resolved as an executable"))
end
|