Class: Bio::DB::Primer3::Primer

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/db/primer3.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePrimer

Returns a new instance of Primer.



665
666
667
# File 'lib/bio/db/primer3.rb', line 665

def initialize
  @values = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object

Raises:

  • (NoMethodError.new())


669
670
671
672
# File 'lib/bio/db/primer3.rb', line 669

def method_missing(m, *args, &block)
  return @values[m.to_s] if @values[m.to_s] != nil
  raise NoMethodError.new(), "There's no method called #{m}, available: #{@values.keys.to_s}."  
end

Instance Attribute Details

#pairObject

Returns the value of attribute pair.



664
665
666
# File 'lib/bio/db/primer3.rb', line 664

def pair
  @pair
end

Instance Method Details

#set_value(key, value) ⇒ Object



674
675
676
# File 'lib/bio/db/primer3.rb', line 674

def set_value(key, value)
  @values[key] = value
end