Class | Bio::Nexus::Util |
In: |
lib/bio/db/nexus.rb
|
Parent: | Object |
Bio::Nexus::Util is a class containing static helper methods
Returns true if Integer i is not nil and larger than 0.
Arguments:
Returns: | true or false |
# File lib/bio/db/nexus.rb, line 1835 1835: def Util::larger_than_zero( i ) 1836: return ( i != nil && i.to_i > 0 ) 1837: end
Helper method to produce nexus formatted data.
Arguments:
Returns: | String |
# File lib/bio/db/nexus.rb, line 1804 1804: def Util::to_nexus_helper( block, lines ) 1805: str = String.new 1806: str << BEGIN_BLOCK << " " << block << END_OF_LINE 1807: lines.each do | line | 1808: if ( line != nil ) 1809: str << INDENTENTION << line << END_OF_LINE 1810: end 1811: end # do 1812: str << END_BLOCK << END_OF_LINE 1813: str 1814: end