Class: Groonga::Variable

Inherits:
Object
  • Object
show all
Defined in:
ext/rb-grn-variable.c,
ext/rb-grn-variable.c

Overview

Groonga::Expressionで使われる変数。

Instance Method Summary collapse

Methods inherited from Object

#==, #[], #[]=, #append, #close, #closed?, #domain, #id, #inspect, #name, #path, #persistent?, #prepend, #range, #remove, #temporary?

Instance Method Details

#valueGroonga::Object

変数の値を返す。

Returns:



67
68
69
70
71
72
73
74
75
76
77
78
# File 'ext/rb-grn-variable.c', line 67

static VALUE
rb_grn_variable_get_value (VALUE self)
{
    grn_ctx *context = NULL;
    grn_obj *variable;

    rb_grn_variable_deconstruct(SELF(self), &variable, &context,
                                NULL, NULL,
                                NULL, NULL);

    return GRNOBJ2RVAL(Qnil, context, variable, self);
}

#value=(value) ⇒ Object

変数の値をvalueに設定する。



86
87
88
89
90
91
92
93
94
95
96
97
# File 'ext/rb-grn-variable.c', line 86

static VALUE
rb_grn_variable_set_value (VALUE self, VALUE value)
{
    grn_ctx *context = NULL;
    grn_obj *variable;

    rb_grn_variable_deconstruct(SELF(self), &variable, &context,
                                NULL, NULL,
                                NULL, NULL);
    RVAL2GRNOBJ(value, context, &variable);
    return Qnil;
}