Class: SimpleBioC::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_bioc/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ Location

Returns a new instance of Location.



6
7
8
9
10
11
# File 'lib/simple_bioc/location.rb', line 6

def initialize(parent)
  @offset = 0
  # @original_offset = 0
  @length = 0
  @annotation = parent
end

Instance Attribute Details

#annotationObject (readonly)

Returns the value of attribute annotation.



4
5
6
# File 'lib/simple_bioc/location.rb', line 4

def annotation
  @annotation
end

#lengthObject

, :original_offset



3
4
5
# File 'lib/simple_bioc/location.rb', line 3

def length
  @length
end

#offsetObject

, :original_offset



3
4
5
# File 'lib/simple_bioc/location.rb', line 3

def offset
  @offset
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/simple_bioc/location.rb', line 13

def to_s
  "Location @#{offset}:#{length}"
end