Class: StrideAlign::AlignmentResult
- Inherits:
-
AlignmentPath
- Object
- AlignmentPath
- StrideAlign::AlignmentResult
- Defined in:
- lib/stride_align/alignment_path.rb
Constant Summary
Constants inherited from AlignmentPath
StrideAlign::AlignmentPath::ATTRIBUTES
Instance Attribute Summary collapse
-
#aligned_query ⇒ Object
readonly
Returns the value of attribute aligned_query.
-
#aligned_target ⇒ Object
readonly
Returns the value of attribute aligned_target.
Instance Method Summary collapse
- #aligned ⇒ Object
-
#initialize(aligned_query: "", aligned_target: "", **attributes) ⇒ AlignmentResult
constructor
A new instance of AlignmentResult.
- #to_h ⇒ Object
- #to_path ⇒ Object
Methods inherited from AlignmentPath
Constructor Details
#initialize(aligned_query: "", aligned_target: "", **attributes) ⇒ AlignmentResult
Returns a new instance of AlignmentResult.
44 45 46 47 48 |
# File 'lib/stride_align/alignment_path.rb', line 44 def initialize(aligned_query: "", aligned_target: "", **attributes) super(**attributes) @aligned_query = aligned_query @aligned_target = aligned_target end |
Instance Attribute Details
#aligned_query ⇒ Object (readonly)
Returns the value of attribute aligned_query.
42 43 44 |
# File 'lib/stride_align/alignment_path.rb', line 42 def aligned_query @aligned_query end |
#aligned_target ⇒ Object (readonly)
Returns the value of attribute aligned_target.
42 43 44 |
# File 'lib/stride_align/alignment_path.rb', line 42 def aligned_target @aligned_target end |
Instance Method Details
#aligned ⇒ Object
50 51 52 |
# File 'lib/stride_align/alignment_path.rb', line 50 def aligned { query: aligned_query, target: aligned_target } end |
#to_h ⇒ Object
54 55 56 |
# File 'lib/stride_align/alignment_path.rb', line 54 def to_h super.merge(aligned: aligned) end |
#to_path ⇒ Object
58 59 60 61 62 63 |
# File 'lib/stride_align/alignment_path.rb', line 58 def to_path attributes = AlignmentPath::ATTRIBUTES.each_with_object({}) do |name, output| output[name] = public_send(name) end AlignmentPath.new(**attributes) end |