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.



250
251
252
253
254
# File 'lib/BioDSL/seq/backtrack.rb', line 250

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

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



248
249
250
# File 'lib/BioDSL/seq/backtrack.rb', line 248

def length
  @length
end

#matchObject (readonly)

Returns the value of attribute match.



248
249
250
# File 'lib/BioDSL/seq/backtrack.rb', line 248

def match
  @match
end

#posObject (readonly)

Returns the value of attribute pos.



248
249
250
# File 'lib/BioDSL/seq/backtrack.rb', line 248

def pos
  @pos
end

Instance Method Details

#startObject



256
257
258
# File 'lib/BioDSL/seq/backtrack.rb', line 256

def start
  @pos
end

#stopObject



260
261
262
# File 'lib/BioDSL/seq/backtrack.rb', line 260

def stop
  @pos + @length - 1
end

#to_sObject



264
265
266
# File 'lib/BioDSL/seq/backtrack.rb', line 264

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