Class | Bio::RestrictionEnzyme::Range::CutRanges
In: | lib/bio/util/restriction_enzyme/range/cut_ranges.rb
Parent: | Array

Container for many CutRange objects or CutRange child objects. Inherits from array.

### Methods

include? max max_vertical min min_vertical vertical_min_max_helper

### Public Instance methods

include?(i)

[Source]

        # File lib/bio/util/restriction_enzyme/range/cut_ranges.rb, line 21
    21:   def include?(i); self.collect{|a| a.include?(i)}.include?(true); end

max()

[Source]

        # File lib/bio/util/restriction_enzyme/range/cut_ranges.rb, line 20
    20:   def max; self.collect{|a| a.max}.flatten.sort.last; end

max_vertical()

[Source]

        # File lib/bio/util/restriction_enzyme/range/cut_ranges.rb, line 27
    27:   def max_vertical
    28:     vertical_min_max_helper( :max )
    29:   end

min()

[Source]

        # File lib/bio/util/restriction_enzyme/range/cut_ranges.rb, line 19
    19:   def min; self.collect{|a| a.min}.flatten.sort.first; end

min_vertical()

[Source]

        # File lib/bio/util/restriction_enzyme/range/cut_ranges.rb, line 23
    23:   def min_vertical
    24:     vertical_min_max_helper( :min )
    25:   end

### Protected Instance methods

vertical_min_max_helper( sym_which )

[Source]

        # File lib/bio/util/restriction_enzyme/range/cut_ranges.rb, line 33
    33:   def vertical_min_max_helper( sym_which )
    34:     tmp = []
    35:     self.each do |a|
    36:       next unless a.class == Bio::RestrictionEnzyme::Range::VerticalCutRange
    37:       tmp << a.send( sym_which )
    38:     end
    39:     z = (sym_which == :max) ? :last : :first
    40:     tmp.flatten.sort.send(z)
    41:   end

[Validate]