Class: Bio::BioAlignment::Element
- Inherits:
-
Object
- Object
- Bio::BioAlignment::Element
- Includes:
- State
- Defined in:
- lib/bio-alignment/elements.rb
Overview
Simple element that can be queried
Constant Summary collapse
- GAP =
'-'
- UNDEFINED =
'X'
Instance Attribute Summary
Attributes included from State
Instance Method Summary collapse
- #==(other) ⇒ Object
- #gap? ⇒ Boolean
-
#initialize(c) ⇒ Element
constructor
A new instance of Element.
- #to_s ⇒ Object
- #undefined? ⇒ Boolean
Constructor Details
#initialize(c) ⇒ Element
Returns a new instance of Element.
11 12 13 |
# File 'lib/bio-alignment/elements.rb', line 11 def initialize c @c = c end |
Instance Method Details
#==(other) ⇒ Object
23 24 25 |
# File 'lib/bio-alignment/elements.rb', line 23 def == other to_s == other.to_s end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/bio-alignment/elements.rb', line 20 def to_s @c end |
#undefined? ⇒ Boolean
17 18 19 |
# File 'lib/bio-alignment/elements.rb', line 17 def undefined? @c == 'X' end |