class Bio::GFF::GFF2::MetaData
Stores GFF2
meta-data.
Attributes
data of this entry
Directive. Usually, one of “feature-ontology”, “attribute-ontology”, or “source-ontology”.
Public Class Methods
Source
# File lib/bio/db/gff.rb 769 def initialize(directive, data = nil) 770 @directive = directive 771 @data = data 772 end
Creates a new MetaData
object
Source
# File lib/bio/db/gff.rb 782 def self.parse(line) 783 directive, data = line.chomp.split(/\s+/, 2) 784 directive = directive.sub(/\A\#\#/, '') if directive 785 self.new(directive, data) 786 end
parses a line
Public Instance Methods
Source
# File lib/bio/db/gff.rb 796 def ==(other) 797 if self.class == other.class and 798 self.directive == other.directive and 799 self.data == other.data then 800 true 801 else 802 false 803 end 804 end
Returns true if self == other. Otherwise, returns false.
Source
# File lib/bio/db/gff.rb 789 def to_s 790 d = @directive.to_s.gsub(/[\r\n]+/, ' ') 791 v = ' ' + @data.to_s.gsub(/[\r\n]+/, ' ') unless @data.to_s.empty? 792 "\#\##{d}#{v}\n" 793 end
string representation of this meta-data