Class | Bio::GFF::GFF2::Record::Value
In: | lib/bio/db/gff.rb
Parent: | Object

Stores GFF2 attribute‘s value.

### Methods

== new to_a to_s values

### Included Modules

Escape

### Public Class methods

new(values = [])

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.

[Source]

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

### Public Instance methods

==(other)

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

[Source]

         # File lib/bio/db/gff.rb, line 351
    351:           def ==(other)
    352:             return false unless other.kind_of?(self.class) or
    353:               self.kind_of?(other.class)
    354:             self.values == other.values rescue super(other)
    355:           end

to_a()

Alias for values

to_s()

Returns string representation of this Value object.

Returns: | String

[Source]

         # File lib/bio/db/gff.rb, line 332
    332:           def to_s
    333:             @values.collect do |str|
    334:               escape_gff2_attribute_value(str)
    335:             end.join(' ')
    336:           end

values()

Returns all values in this object.

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

Returns: | Array

[Source]

         # File lib/bio/db/gff.rb, line 344
    344:           def values
    345:             @values
    346:           end

[Validate]