Class: BioDSL::BackTrack::Match

Inherits:
Object
  • Object
show all
Defined in:
lib/BioDSL/seq/backtrack.rb

Overview

Class containing match information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pos, length, match) ⇒ Match

Returns a new instance of Match.



230
231
232
233
234
# File 'lib/BioDSL/seq/backtrack.rb', line 230

def initialize(pos, length, match)
  @pos    = pos
  @length = length
  @match  = match
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



228
229
230
# File 'lib/BioDSL/seq/backtrack.rb', line 228

def length
  @length
end

#matchObject (readonly)

Returns the value of attribute match.



228
229
230
# File 'lib/BioDSL/seq/backtrack.rb', line 228

def match
  @match
end

#posObject (readonly)

Returns the value of attribute pos.



228
229
230
# File 'lib/BioDSL/seq/backtrack.rb', line 228

def pos
  @pos
end

Instance Method Details

#startObject



236
237
238
# File 'lib/BioDSL/seq/backtrack.rb', line 236

def start
  @pos
end

#stopObject



240
241
242
# File 'lib/BioDSL/seq/backtrack.rb', line 240

def stop
  @pos + @length - 1
end

#to_sObject



244
245
246
# File 'lib/BioDSL/seq/backtrack.rb', line 244

def to_s
  "#{pos}:#{length}:#{match}"
end