Sha256: 7fda60710779107efef14d80e1e31e5423c03c740197c1f74ae9fe635678b0cc

Contents?: true

Size: 1.65 KB

Versions: 12

Compression:

Stored size: 1.65 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:	to_s:@docstringIC:YARD::Docstring"¯Return a string representing this module or class. For basic
classes and modules, this is the name. For singletons, we
show information on the thing we're attached to as well.
:@objectu:YARD::StubProxyModule#to_s:
@summary0:	@all"ÓReturn a string representing this module or class. For basic
classes and modules, this is the name. For singletons, we
show information on the thing we're attached to as well.


@overload to_s
  @return [String]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Module#to_s;;;IC;	"
;
u;Module#to_s;0;
"@return [String];[;[o:YARD::Tags::Tag
;
0;0:@types["String:
@text":@tag_name"return;0:@parameters[;0:@signature"	to_s;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["
object.c0:@namespaceu;Module:
@path"Module#to_s;[:@visibility:public:@source"Ó/*
 * call-seq:
 *   mod.to_s   => string
 *
 * Return a string representing this module or class. For basic
 * classes and modules, this is the name. For singletons, we
 * show information on the thing we're attached to as well.
 */

static VALUE
rb_mod_to_s(klass)
    VALUE klass;

{
    if (FL_TEST(klass, FL_SINGLETON)) {
    VALUE s = rb_str_new2("#<");
    VALUE v = rb_iv_get(klass, "__attached__");

    rb_str_cat2(s, "Class:");
    switch (TYPE(v)) {
      case T_CLASS: case T_MODULE:
        rb_str_append(s, rb_inspect(v));
        break;
      default:
        rb_str_append(s, rb_any_to_s(v));
        break;
    }
    rb_str_cat2(s, ">");

    return s;
    }
    return rb_str_dup(rb_class_name(klass));
}:@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/to_s_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Module/to_s_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Module/to_s_i.dat