Sha256: 9a244cf813d1d11e8f6a3aa19cc58fea40a56a0049f0bf8a3445fb13a08125df

Contents?: true

Size: 1.53 KB

Versions: 40

Compression:

Stored size: 1.53 KB

Contents

/* -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
  Copyright (C) 2016  Kouhei Sutou <kou@clear-code.com>

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License version 2.1 as published by the Free Software Foundation.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include "rb-grn.h"

/*
 * Document-class: Groonga::Name
 *
 * This module provides object name related features.
 */

/*
 * @overload column?(name)
 *   @param [String] name The name to be confirmed.
 *   @return [Boolean] `true` if the `name` is column, `false` otherwise.
 *
 * @since 6.0.5
 */
static VALUE
rb_grn_name_s_column_p (VALUE self, VALUE rb_name)
{
    grn_ctx *ctx = NULL;
    const char *name;
    size_t name_size;

    name = StringValueCStr(rb_name);
    name_size = RSTRING_LEN(rb_name);

    return CBOOL2RVAL(grn_obj_name_is_column(ctx, name, name_size));
}

void
rb_grn_init_name (VALUE mGrn)
{
    VALUE mGrnName;

    mGrnName = rb_define_module_under(mGrn, "Name");

    rb_define_singleton_method(mGrnName, "column?", rb_grn_name_s_column_p, 1);
}

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
rroonga-14.1.2 ext/groonga/rb-grn-name.c
rroonga-12.1.0 ext/groonga/rb-grn-name.c
rroonga-12.0.8 ext/groonga/rb-grn-name.c
rroonga-12.0.2 ext/groonga/rb-grn-name.c
rroonga-12.0.0 ext/groonga/rb-grn-name.c
rroonga-11.0.6 ext/groonga/rb-grn-name.c
rroonga-11.0.0 ext/groonga/rb-grn-name.c
rroonga-10.0.6 ext/groonga/rb-grn-name.c
rroonga-10.0.2 ext/groonga/rb-grn-name.c
rroonga-10.0.1 ext/groonga/rb-grn-name.c
rroonga-9.0.7-x64-mingw32 ext/groonga/rb-grn-name.c
rroonga-9.0.7-x86-mingw32 ext/groonga/rb-grn-name.c
rroonga-9.0.7 ext/groonga/rb-grn-name.c
rroonga-9.0.3-x64-mingw32 ext/groonga/rb-grn-name.c
rroonga-9.0.3-x86-mingw32 ext/groonga/rb-grn-name.c
rroonga-9.0.3 ext/groonga/rb-grn-name.c
rroonga-9.0.2-x64-mingw32 ext/groonga/rb-grn-name.c
rroonga-9.0.2-x86-mingw32 ext/groonga/rb-grn-name.c
rroonga-9.0.2 ext/groonga/rb-grn-name.c
rroonga-7.1.1-x64-mingw32 ext/groonga/rb-grn-name.c