Module Bio::PDB::DataType::Pdb_String
In: lib/bio/db/pdb/pdb.rb

Methods

[]   new  

Public Class methods

Creates a new module with a string left justified to the length given in nn

[Source]

     # 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

[Source]

    # File lib/bio/db/pdb/pdb.rb, line 93
93:         def self.new(str)
94:           str.to_s.gsub(/\s+\z/, '')
95:         end

[Validate]