lib/scaffolder/test/annotation.rb in scaffolder-test-helpers-0.4.0 vs lib/scaffolder/test/annotation.rb in scaffolder-test-helpers-0.4.1
- old
+ new
@@ -1,11 +1,11 @@
require 'scaffolder'
module Scaffolder::Test
class Annotation
- [:seqname,:start,:end,:strand,:phase,:feature].each do |attribute|
+ [:seqname,:start,:end,:strand,:phase,:feature,:attributes].each do |attribute|
define_method(attribute) do |*arg|
unless arg.first
return @options[attribute]
end
@options[attribute] = arg.first
@@ -25,10 +25,11 @@
end
def to_gff3_record
Bio::GFF::GFF3::Record.new(
self.seqname, nil, self.feature, self.start,
- self.end, nil, self.strand, self.phase)
+ self.end, nil, self.strand, self.phase,
+ self.attributes.to_a)
end
end
end