Class: Bio::RestrictionEnzyme::Range::SequenceRange::Fragments
- Inherits:
-
Array
- Object
- Array
- Bio::RestrictionEnzyme::Range::SequenceRange::Fragments
- Defined in:
- lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb
Defined Under Namespace
Classes: DisplayFragment
Instance Attribute Summary collapse
-
#complement ⇒ Object
Returns the value of attribute complement.
-
#primary ⇒ Object
Returns the value of attribute primary.
Instance Method Summary collapse
- #for_display(p_str = nil, c_str = nil) ⇒ Object
-
#initialize(primary, complement) ⇒ Fragments
constructor
A new instance of Fragments.
Constructor Details
#initialize(primary, complement) ⇒ Fragments
Returns a new instance of Fragments.
15 16 17 18 |
# File 'lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb', line 15 def initialize(primary, complement) @primary = primary @complement = complement end |
Instance Attribute Details
#complement ⇒ Object
Returns the value of attribute complement.
13 14 15 |
# File 'lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb', line 13 def complement @complement end |
#primary ⇒ Object
Returns the value of attribute primary.
12 13 14 |
# File 'lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb', line 12 def primary @primary end |
Instance Method Details
#for_display(p_str = nil, c_str = nil) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb', line 22 def for_display(p_str=nil, c_str=nil) p_str ||= @primary c_str ||= @complement pretty_fragments = [] self.each { |fragment| pretty_fragments << fragment.for_display(p_str, c_str) } pretty_fragments end |