Class | Bio::RestrictionEnzyme::DoubleStranded::CutLocations
In: | lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
Parent: | Array

Contains an `Array` of CutLocationPair objects.

### Methods

complement new primary validate_args

### Public Class methods

new(*args)

CutLocations constructor.

Contains an `Array` of CutLocationPair objects.

Example:

      clp1 = CutLocationPair.new(3,2)
      clp2 = CutLocationPair.new(7,9)
      pairs = CutLocations.new(clp1, clp2)

Arguments

- `args`: Any number of `CutLocationPair` objects

Returns: | nothing

[Source]

        # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 33
    33:   def initialize(*args)
    34:     validate_args(args)
    35:     super(args)
    36:   end

### Public Instance methods

complement()

Returns an `Array` of locations of cuts on the complementary strand

Arguments

- none

Returns: | `Array` of locations of cuts on the complementary strand

[Source]

        # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 54
    54:   def complement
    55:     self.collect {|a| a[1]}
    56:   end

primary()

Returns an `Array` of locations of cuts on the primary strand

Arguments

- none

Returns: | `Array` of locations of cuts on the primary strand

[Source]

        # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 44
    44:   def primary
    45:     self.collect {|a| a[0]}
    46:   end

### Protected Instance methods

validate_args(args)

[Source]

        # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 62
    62:   def validate_args(args)
    63:     args.each do |a|
    64:       unless a.class == Bio::RestrictionEnzyme::DoubleStranded::CutLocationPair
    65:         err = "Not a CutLocationPair\n"
    66:         err += "class: #{a.class}\n"
    67:         err += "inspect: #{a.inspect}"
    68:         raise ArgumentError, err
    69:       end
    70:     end
    71:   end

[Validate]