Class: Usamin::Value
- Inherits:
-
Object
- Object
- Usamin::Value
- Defined in:
- ext/usamin/usamin.cpp
Instance Method Summary collapse
-
#array? ⇒ Boolean
Returns whether the value is array.
-
#eval ⇒ Object
Convert to Ruby data structures.
-
#eval_r ⇒ Object
Convert to Ruby data structures recursively.
-
#frozen? ⇒ Boolean
Always true.
-
#hash? ⇒ Boolean
Returns whether the value is object.
-
#object? ⇒ Boolean
Returns whether the value is object.
-
#root ⇒ UsaminValue
Returns root object.
Instance Method Details
#array? ⇒ Boolean
Returns whether the value is array.
521 522 523 524 525 |
# File 'ext/usamin/usamin.cpp', line 521
static VALUE w_value_isarray(const VALUE self) {
UsaminValue *value = get_value(self);
check_value(value);
return value->value->IsArray() ? Qtrue : Qfalse;
}
|
#eval ⇒ Object
Convert to Ruby data structures.
541 542 543 544 545 546 547 548 549 550 |
# File 'ext/usamin/usamin.cpp', line 541
static VALUE w_value_eval(const VALUE self) {
UsaminValue *value = get_value(self);
check_value(value);
if (value->value->IsObject())
return eval_object(*(value->value), value->root_document);
else if (value->value->IsArray())
return eval_array(*(value->value), value->root_document);
else
return Qnil;
}
|
#eval_r ⇒ Object
Convert to Ruby data structures recursively.
557 558 559 560 561 |
# File 'ext/usamin/usamin.cpp', line 557
static VALUE w_value_eval_r(const VALUE self) {
UsaminValue *value = get_value(self);
check_value(value);
return eval_r(*(value->value));
}
|
#frozen? ⇒ Boolean
Always true.
566 567 568 |
# File 'ext/usamin/usamin.cpp', line 566 static VALUE w_value_isfrozen(const VALUE self) { return Qtrue; } |
#hash? ⇒ Boolean
Returns whether the value is object.
530 531 532 533 534 |
# File 'ext/usamin/usamin.cpp', line 530
static VALUE w_value_isobject(const VALUE self) {
UsaminValue *value = get_value(self);
check_value(value);
return value->value->IsObject() ? Qtrue : Qfalse;
}
|
#object? ⇒ Boolean
Returns whether the value is object.
530 531 532 533 534 |
# File 'ext/usamin/usamin.cpp', line 530
static VALUE w_value_isobject(const VALUE self) {
UsaminValue *value = get_value(self);
check_value(value);
return value->value->IsObject() ? Qtrue : Qfalse;
}
|
#root ⇒ UsaminValue
Returns root object.
575 576 577 578 579 |
# File 'ext/usamin/usamin.cpp', line 575
static VALUE w_value_root(const VALUE self) {
UsaminValue *value = get_value(self);
check_value(value);
return value->root_document;
}
|