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

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 98
        def self.[](nn)
          m = Module.new
          m.module_eval %Q{
            @@nn = nn
            def self.new(str)
              str.to_s.gsub(/\s+\z/, '').ljust(@@nn)[0, @@nn]
            end
          }
          m
        end

[Source]

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

[Validate]