Module | Bio::PDB::DataType::Pdb_String |
In: |
lib/bio/db/pdb/pdb.rb
|
Creates a new module with a string left justified to the length given in nn
# File lib/bio/db/pdb/pdb.rb, line 99 99: def self.[](nn) 100: m = Module.new 101: m.module_eval %Q{ 102: @@nn = nn 103: def self.new(str) 104: str.to_s.gsub(/\s+\z/, '').ljust(@@nn)[0, @@nn] 105: end 106: } 107: m 108: end