Sha256: c0c4f5cf20e82dd273797816ae0e4170de0de98f98f048528d97215e2269f1b3

Contents?: true

Size: 1.94 KB

Versions: 12

Compression:

Stored size: 1.94 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:class_variable_get:@docstringIC:YARD::Docstring"#Returns the value of the given class variable (or throws a
<code>NameError</code> exception). The <code>@@</code> part of the
variable name should be included for regular class variables

   class Fred
     @@foo = 99
   end

   def Fred.foo
     class_variable_get(:@@foo)     #=> 99
   end
:@objectu:YARD::StubProxyModule#class_variable_get:
@summary0:	@all"]Returns the value of the given class variable (or throws a
<code>NameError</code> exception). The <code>@@</code> part of the
variable name should be included for regular class variables

   class Fred
     @@foo = 99
   end

   def Fred.foo
     class_variable_get(:@@foo)     #=> 99
   end


@overload class_variable_get(symbol)
  @return [Object]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Module#class_variable_get;;;IC;	"
;
u;Module#class_variable_get;0;
"@return [Object];[;[o:YARD::Tags::Tag
;
0;0:@types["Object:
@text":@tag_name"return;0:@parameters[[:symbol0;0:@signature"class_variable_get(symbol);"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["
object.c0:@namespaceu;Module:
@path"Module#class_variable_get;[:@visibility:public:@source"/*
 *  call-seq:
 *     mod.class_variable_get(symbol)    => obj
 *  
 *  Returns the value of the given class variable (or throws a
 *  <code>NameError</code> exception). The <code>@@</code> part of the
 *  variable name should be included for regular class variables
 *     
 *     class Fred
 *       @@foo = 99
 *     end
 *
 *     def Fred.foo
 *       class_variable_get(:@@foo)     #=> 99
 *     end
 */

static VALUE
rb_mod_cvar_get(obj, iv)
    VALUE obj, iv;
{
    ID id = rb_to_id(iv);

    if (!rb_is_class_id(id)) {
    rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id));
    }
    return rb_cvar_get(obj, id);
}:@source_type:c

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Module/class_variable_get_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Module/class_variable_get_i.dat