Module: Gherkin::CLexer

Defined in:
lib/gherkin/c_lexer.rb,
ext/gherkin_lexer_ar/gherkin_lexer_ar.c,
ext/gherkin_lexer_bg/gherkin_lexer_bg.c,
ext/gherkin_lexer_ca/gherkin_lexer_ca.c,
ext/gherkin_lexer_cs/gherkin_lexer_cs.c,
ext/gherkin_lexer_da/gherkin_lexer_da.c,
ext/gherkin_lexer_de/gherkin_lexer_de.c,
ext/gherkin_lexer_en/gherkin_lexer_en.c,
ext/gherkin_lexer_eo/gherkin_lexer_eo.c,
ext/gherkin_lexer_es/gherkin_lexer_es.c,
ext/gherkin_lexer_et/gherkin_lexer_et.c,
ext/gherkin_lexer_fi/gherkin_lexer_fi.c,
ext/gherkin_lexer_fr/gherkin_lexer_fr.c,
ext/gherkin_lexer_he/gherkin_lexer_he.c,
ext/gherkin_lexer_hr/gherkin_lexer_hr.c,
ext/gherkin_lexer_hu/gherkin_lexer_hu.c,
ext/gherkin_lexer_id/gherkin_lexer_id.c,
ext/gherkin_lexer_it/gherkin_lexer_it.c,
ext/gherkin_lexer_ja/gherkin_lexer_ja.c,
ext/gherkin_lexer_ko/gherkin_lexer_ko.c,
ext/gherkin_lexer_lt/gherkin_lexer_lt.c,
ext/gherkin_lexer_lu/gherkin_lexer_lu.c,
ext/gherkin_lexer_lv/gherkin_lexer_lv.c,
ext/gherkin_lexer_nl/gherkin_lexer_nl.c,
ext/gherkin_lexer_no/gherkin_lexer_no.c,
ext/gherkin_lexer_pl/gherkin_lexer_pl.c,
ext/gherkin_lexer_pt/gherkin_lexer_pt.c,
ext/gherkin_lexer_ro/gherkin_lexer_ro.c,
ext/gherkin_lexer_ru/gherkin_lexer_ru.c,
ext/gherkin_lexer_sk/gherkin_lexer_sk.c,
ext/gherkin_lexer_sv/gherkin_lexer_sv.c,
ext/gherkin_lexer_tr/gherkin_lexer_tr.c,
ext/gherkin_lexer_uk/gherkin_lexer_uk.c,
ext/gherkin_lexer_uz/gherkin_lexer_uz.c,
ext/gherkin_lexer_vi/gherkin_lexer_vi.c,
ext/gherkin_lexer_cy_gb/gherkin_lexer_cy_gb.c,
ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c,
ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.c,
ext/gherkin_lexer_zh_cn/gherkin_lexer_zh_cn.c,
ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c,
ext/gherkin_lexer_en_lol/gherkin_lexer_en_lol.c,
ext/gherkin_lexer_sr_cyrl/gherkin_lexer_sr_cyrl.c,
ext/gherkin_lexer_sr_latn/gherkin_lexer_sr_latn.c,
ext/gherkin_lexer_en_pirate/gherkin_lexer_en_pirate.c,
ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c

Defined Under Namespace

Classes: Ar, Bg, Ca, Cs, Cy_gb, Da, De, En, En_au, En_lol, En_pirate, En_scouse, En_tx, Eo, Es, Et, Fi, Fr, He, Hr, Hu, Id, It, Ja, Ko, Lt, Lu, Lv, Nl, No, Pl, Pt, Ro, Ru, Sk, Sr_cyrl, Sr_latn, Sv, Tr, Uk, Uz, Vi, Zh_cn, Zh_tw

Class Method Summary collapse

Class Method Details

.[](i18n_underscored_iso_code) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/gherkin/c_lexer.rb', line 5

def self.[](i18n_underscored_iso_code)
  begin
    prefix = Config::CONFIG['arch'] =~ /mswin|mingw/ ? "#{Config::CONFIG['MAJOR']}.#{Config::CONFIG['MINOR']}/" : ''
    lib = "#{prefix}gherkin_lexer_#{i18n_underscored_iso_code}"
    require lib
    const_get(i18n_underscored_iso_code.capitalize)
  rescue LoadError => e
    e.message << %{\nCouldn't load #{lib}\nThe $LOAD_PATH was:\n#{$LOAD_PATH.join("\n")}}
    raise e
  end
end