class Bio::GFF::GFF2::Record::Value

Stores GFF2 attribute's value.

Public Class Methods

new(values = []) click to toggle source

Creates a new Value object. Note that the given array values is directly stored in the object.


Arguments:

  • (optional) values: Array containing String objects.

Returns

Value object.

# File lib/bio/db/gff.rb, line 324
def initialize(values = [])
  @values = values
end

Public Instance Methods

==(other) click to toggle source

Returns true if other == self. Otherwise, returns false.

# File lib/bio/db/gff.rb, line 350
def ==(other)
  return false unless other.kind_of?(self.class) or
    self.kind_of?(other.class)
  self.values == other.values rescue super(other)
end
to_a()
Alias for: values
to_s() click to toggle source

Returns string representation of this Value object.


Returns

String

# File lib/bio/db/gff.rb, line 331
def to_s
  @values.collect do |str|
    escape_gff2_attribute_value(str)
  end.join(' ')
end
values() click to toggle source

Returns all values in this object.

Note that modification of the returned array would affect original Value object.


Returns

Array

# File lib/bio/db/gff.rb, line 343
def values
  @values
end
Also aliased as: to_a