Class: Winevt::EventLog::Locale
- Inherits:
-
Object
- Object
- Winevt::EventLog::Locale
- Defined in:
- ext/winevt/winevt_locale.c,
ext/winevt/winevt_locale.c
Overview
handle locales for Windows EventLog’s description.
Instance Method Summary collapse
-
#each {|String, String| ... } ⇒ Object
Enumerate supported locales and its descriptions.
-
#initialize ⇒ Locale
constructor
Initalize Locale class.
Constructor Details
#initialize ⇒ Locale
Initalize Locale class.
57 58 59 60 61 |
# File 'ext/winevt/winevt_locale.c', line 57
static VALUE
rb_winevt_locale_initialize(VALUE self)
{
return Qnil;
}
|
Instance Method Details
#each {|String, String| ... } ⇒ Object
Enumerate supported locales and its descriptions
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'ext/winevt/winevt_locale.c', line 69
static VALUE
rb_winevt_locale_each(VALUE self)
{
RETURN_ENUMERATOR(self, 0, 0);
for (int i = 0; localeInfoTable[i].langCode != NULL; i++) {
rb_yield_values(2,
rb_utf8_str_new_cstr(localeInfoTable[i].langCode),
rb_utf8_str_new_cstr(localeInfoTable[i].description));
}
return Qnil;
}
|