Class: ELDC::DetectResult
- Inherits:
-
Object
- Object
- ELDC::DetectResult
- Defined in:
- lib/eldc.rb,
ext/eldc/rb_eldc.c
Instance Method Summary collapse
- #inspect ⇒ Object
-
#language ⇒ Object
:call-seq: language => “LANG”.
-
#reliable ⇒ Object
:call-seq: reliable -> boolean.
-
#scores ⇒ Object
:call-seq: scores -> [ELDC::ScoreItem, …].
Instance Method Details
#inspect ⇒ Object
37 38 39 |
# File 'lib/eldc.rb', line 37 def inspect "#<#{self.class.name} lang=#{language} reliable=#{reliable} scores=#{scores}>" end |
#language ⇒ Object
:call-seq:
language => "LANG"
195 196 197 198 199 200 |
# File 'ext/eldc/rb_eldc.c', line 195
static VALUE
rb_eldc_detect_result_m_language (VALUE self)
{
EldcDetectResult *result = RTYPEDDATA_DATA (self);
return rb_str_new_cstr (result->language);
}
|
#reliable ⇒ Object
:call-seq:
reliable -> boolean
206 207 208 209 210 211 |
# File 'ext/eldc/rb_eldc.c', line 206
static VALUE
rb_eldc_detect_result_m_reliable (VALUE self)
{
EldcDetectResult *result = RTYPEDDATA_DATA (self);
return result->reliable ? RUBY_Qtrue : RUBY_Qfalse;
}
|
#scores ⇒ Object
:call-seq:
scores -> [ELDC::ScoreItem, ...]
218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'ext/eldc/rb_eldc.c', line 218
static VALUE
rb_eldc_detect_result_m_scores (VALUE self)
{
EldcDetectResult *result = RTYPEDDATA_DATA (self);
VALUE scores = rb_ary_new ();
for (int index = 0; index < result->n_scores; index++)
{
VALUE item = rb_data_typed_object_wrap (
rb_cScoreItem, &result->scores[index], &rb_eldc_score_item_type);
rb_ary_push (scores, item);
}
return scores;
}
|