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.
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
#length ⇒ Object (readonly)
Returns the value of attribute length.
228 229 230 |
# File 'lib/BioDSL/seq/backtrack.rb', line 228 def length @length end |
#match ⇒ Object (readonly)
Returns the value of attribute match.
228 229 230 |
# File 'lib/BioDSL/seq/backtrack.rb', line 228 def match @match end |
#pos ⇒ Object (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
#start ⇒ Object
236 237 238 |
# File 'lib/BioDSL/seq/backtrack.rb', line 236 def start @pos end |
#stop ⇒ Object
240 241 242 |
# File 'lib/BioDSL/seq/backtrack.rb', line 240 def stop @pos + @length - 1 end |
#to_s ⇒ Object
244 245 246 |
# File 'lib/BioDSL/seq/backtrack.rb', line 244 def to_s "#{pos}:#{length}:#{match}" end |