Class: Object
- Inherits:
- BasicObject
- Defined in:
- (unknown)
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'ext/faster_support/core_ext/object/blank/object_blank.c', line 7
static VALUE rb_obj_blank(VALUE obj)
{
VALUE empty;
if (rb_respond_to(obj, id_empty)) {
empty = rb_funcall(obj, id_empty, 0);
if (empty == Qnil || empty == Qfalse) {
return Qfalse;
}
return Qtrue;
}
empty = (obj == Qnil || obj == Qfalse) ? Qtrue : Qfalse;
return empty;
}
|
#present? ⇒ Boolean
25 26 27 28 |
# File 'ext/faster_support/core_ext/object/blank/object_blank.c', line 25
static VALUE rb_obj_present(VALUE obj)
{
return RB_NEGATE(rb_obj_blank(obj));
}
|