Class: BioDSL::BackTrack::Match
- Inherits:
-
Object
- Object
- BioDSL::BackTrack::Match
- Defined in:
- lib/BioDSL/seq/backtrack.rb
Overview
Class containing match information.
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#match ⇒ Object
readonly
Returns the value of attribute match.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
Instance Method Summary collapse
-
#initialize(pos, length, match) ⇒ Match
constructor
A new instance of Match.
- #start ⇒ Object
- #stop ⇒ Object
- #to_s ⇒ Object
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
#length ⇒ Object (readonly)
Returns the value of attribute length.
248 249 250 |
# File 'lib/BioDSL/seq/backtrack.rb', line 248 def length @length end |
#match ⇒ Object (readonly)
Returns the value of attribute match.
248 249 250 |
# File 'lib/BioDSL/seq/backtrack.rb', line 248 def match @match end |
#pos ⇒ Object (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
#start ⇒ Object
256 257 258 |
# File 'lib/BioDSL/seq/backtrack.rb', line 256 def start @pos end |
#stop ⇒ Object
260 261 262 |
# File 'lib/BioDSL/seq/backtrack.rb', line 260 def stop @pos + @length - 1 end |
#to_s ⇒ Object
264 265 266 |
# File 'lib/BioDSL/seq/backtrack.rb', line 264 def to_s "#{pos}:#{length}:#{match}" end |