Class: SimpleBioC::Location
- Inherits:
-
Object
- Object
- SimpleBioC::Location
- Defined in:
- lib/simple_bioc/location.rb
Instance Attribute Summary collapse
-
#annotation ⇒ Object
readonly
Returns the value of attribute annotation.
-
#length ⇒ Object
, :original_offset.
-
#offset ⇒ Object
, :original_offset.
Instance Method Summary collapse
-
#initialize(parent) ⇒ Location
constructor
A new instance of Location.
- #to_s ⇒ Object
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
#annotation ⇒ Object (readonly)
Returns the value of attribute annotation.
4 5 6 |
# File 'lib/simple_bioc/location.rb', line 4 def annotation @annotation end |
#length ⇒ Object
, :original_offset
3 4 5 |
# File 'lib/simple_bioc/location.rb', line 3 def length @length end |
#offset ⇒ Object
, :original_offset
3 4 5 |
# File 'lib/simple_bioc/location.rb', line 3 def offset @offset end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/simple_bioc/location.rb', line 13 def to_s "Location @#{offset}:#{length}" end |