/* * Document-method: new * * call-seq: * LDAP::Control.new(oid, value, criticality) => LDAP::Control * * Create a new LDAP::Control. +oid+ is the OID of the control, +value+ is the * value to be assigned to the control, and +criticality+ is the criticality * of the control, which should be *true* or *false*. */ static VALUE rb_ldap_control_initialize (int argc, VALUE argv[], VALUE self) { VALUE oid, value, critical; switch (rb_scan_args (argc, argv, "03", &oid, &value, &critical)) { case 3: rb_ldap_control_set_critical (self, critical); case 2: rb_ldap_control_set_value (self, value); case 1: rb_ldap_control_set_oid (self, oid); default: break; } return Qnil; }