Module: Bio::PDB::DataType::Pdb_Real

Defined in:
lib/bio/db/pdb/pdb.rb

Class Method Summary collapse

Class Method Details

.[](fmt) ⇒ Object



127
128
129
130
131
132
133
134
135
136
# File 'lib/bio/db/pdb/pdb.rb', line 127

def self.[](fmt)
  m = Module.new
  m.module_eval %Q{
    @@format = fmt
    def self.new(str)
      str.to_f
    end
  }
  m
end

.new(str) ⇒ Object



137
138
139
# File 'lib/bio/db/pdb/pdb.rb', line 137

def self.new(str)
  str.to_f
end