Sha256: cc50c2896a314191ad5a70e3bc7ec473b2e975263165c4e9ff571b5bad8e8622
Contents?: true
Size: 372 Bytes
Versions: 396
Compression:
Stored size: 372 Bytes
Contents
class DNA constructor: (@strand) -> @nucleotideCounts = A: @value 'A' T: @value 'T' C: @value 'C' G: @value 'G' value: (nucleotide) -> @strand.split(nucleotide).length - 1 count: (nucleotide) -> throw new Error('Invalid Nucleotide') if nucleotide not of @nucleotideCounts @nucleotideCounts[nucleotide] module.exports = DNA
Version data entries
396 entries across 396 versions & 1 rubygems