ruby - rna-transcription
This commit is contained in:
7
ruby/rna-transcription/rna_transcription.rb
Normal file
7
ruby/rna-transcription/rna_transcription.rb
Normal 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
|
Reference in New Issue
Block a user