Module: Babosa::Transliterator

Defined in:
lib/babosa/transliterator/base.rb,
lib/babosa/transliterator/greek.rb,
lib/babosa/transliterator/hindi.rb,
lib/babosa/transliterator/latin.rb,
lib/babosa/transliterator/danish.rb,
lib/babosa/transliterator/german.rb,
lib/babosa/transliterator/russian.rb,
lib/babosa/transliterator/serbian.rb,
lib/babosa/transliterator/spanish.rb,
lib/babosa/transliterator/swedish.rb,
lib/babosa/transliterator/turkish.rb,
lib/babosa/transliterator/cyrillic.rb,
lib/babosa/transliterator/romanian.rb,
lib/babosa/transliterator/bulgarian.rb,
lib/babosa/transliterator/norwegian.rb,
lib/babosa/transliterator/ukrainian.rb,
lib/babosa/transliterator/macedonian.rb,
lib/babosa/transliterator/vietnamese.rb

Defined Under Namespace

Classes: Base, Bulgarian, Cyrillic, Danish, German, Greek, Hindi, Latin, Macedonian, Norwegian, Romanian, Russian, Serbian, Spanish, Swedish, Turkish, Ukrainian, Vietnamese

Class Method Summary collapse

Class Method Details

.get(symbol) ⇒ Object



7
8
9
10
# File 'lib/babosa/transliterator/base.rb', line 7

def self.get(symbol)
  class_name = symbol.to_s.split("_").map { |a| a.gsub(/\b('?[a-z])/) { Regexp.last_match(1).upcase } }.join
  const_get(class_name)
end