Object
Stores GFF2 meta-data.
data of this entry
Directive. Usually, one of “feature-ontology”, “attribute-ontology”, or “source-ontology”.
Creates a new MetaData object
# File lib/bio/db/gff.rb, line 766 def initialize(directive, data = nil) @directive = directive @data = data end
parses a line
# File lib/bio/db/gff.rb, line 779 def self.parse(line) directive, data = line.chomp.split(/\s+/, 2) directive = directive.sub(/\A\#\#/, '') if directive self.new(directive, data) end
Returns true if self == other. Otherwise, returns false.
# File lib/bio/db/gff.rb, line 793 def ==(other) if self.class == other.class and self.directive == other.directive and self.data == other.data then true else false end end
string representation of this meta-data
# File lib/bio/db/gff.rb, line 786 def to_s d = @directive.to_s.gsub(/[\r\n]+/, ' ') v = ' ' + @data.to_s.gsub(/[\r\n]+/, ' ') unless @data.to_s.empty? "\#\##{d}#{v}\n" end
[Validate]
Generated with the Darkfish Rdoc Generator 2.