Bio::Nexus::Util is a class containing static helper methods
Returns string as array separated by “ ”.
Arguments:
(required) ary: Array
Returns |
# File lib/bio/db/nexus.rb, line 1821 def Util::array_to_string( ary ) str = String.new ary.each do | e | str << e << " " end str.chomp!( " " ) str end
Returns true if Integer i is not nil and larger than 0.
Arguments:
(required) i: Integer
Returns |
true or false |
# File lib/bio/db/nexus.rb, line 1835 def Util::larger_than_zero( i ) return ( i != nil && i.to_i > 0 ) end
Helper method to produce nexus formatted data.
Arguments:
(required) block: Nexus:GenericBlock or its subclasses
(required) block: Array
Returns |
# File lib/bio/db/nexus.rb, line 1804 def Util::to_nexus_helper( block, lines ) str = String.new str << BEGIN_BLOCK << " " << block << END_OF_LINE lines.each do | line | if ( line != nil ) str << INDENTENTION << line << END_OF_LINE end end # do str << END_BLOCK << END_OF_LINE str end
Generated with the Darkfish Rdoc Generator 2.