module Bio::PDB::DataType::Pdb_SymOP

Public Class Methods

[](nn) click to toggle source

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

# File lib/bio/db/pdb/pdb.rb, line 99
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
new(str) click to toggle source
# File lib/bio/db/pdb/pdb.rb, line 93
def self.new(str)
  str.to_s.gsub(/\s+\z/, '')
end