Class: Cambridge::Tokens::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cambridge/tokens.rb

Direct Known Subclasses

Command, Number, String

Instance Method Summary collapse

Instance Method Details

#de_codepoint(array_of_codepoints) ⇒ Object



4
5
6
7
# File 'lib/cambridge/tokens.rb', line 4

def de_codepoint(array_of_codepoints)
  return array_of_codepoints if array_of_codepoints.is_a? String
  array_of_codepoints.map(&:chr).join
end