ruby - rna-transcription

This commit is contained in:
2018-09-27 12:05:28 -04:00
parent e8af849460
commit d83ab1df67
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,7 @@
class Complement
RNA_MAP = {G: 'C', C: 'G', T: 'A', A: 'U'}
def self.of_dna(dna_strand)
dna_strand.chars.map{|n| RNA_MAP[n.to_sym]}.join
end
end