Sha256: b9ebe4f09a57528102810f9f7b99f06ef77a9d277afd56f26c89f9b2a02372d2

Contents?: true

Size: 1.98 KB

Versions: 12

Compression:

Stored size: 1.98 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
instance:@visibility:public:
@pathI"
IO#sync=:EF:@parameters[:@files[[I"	io.c;T0:@current_file_has_commentsF:
@name:
sync=:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"CSets the ``sync mode'' to <code>true</code> or <code>false</code>.
When sync mode is true, all output is immediately flushed to the
underlying operating system and is not buffered internally. Returns
the new state. See also <code>IO#fsync</code>.

   f = File.new("testfile")
   f.sync = true

<em>(produces no output)</em>;F:@objectIu:YARD::StubProxy
IO#sync=;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"sync=(boolean);F;IC;";F;Iu;
IO#sync=;F;0;[;[o:YARD::Tags::Tag
;I"return;F;I";F;0;[I"Boolean;F;0:	@allI"@return [Boolean];F;[[:boolean0;Iu;
IO#sync=;F; I"rSets the ``sync mode'' to <code>true</code> or <code>false</code>.
When sync mode is true, all output is immediately flushed to the
underlying operating system and is not buffered internally. Returns
the new state. See also <code>IO#fsync</code>.

   f = File.new("testfile")
   f.sync = true

<em>(produces no output)</em>


@overload sync=(boolean)
  @return [Boolean];F:@namespaceIu;IO;F:@docstring_extra0:@sourceI"/*
 *  call-seq:
 *     ios.sync = boolean   -> boolean
 *
 *  Sets the ``sync mode'' to <code>true</code> or <code>false</code>.
 *  When sync mode is true, all output is immediately flushed to the
 *  underlying operating system and is not buffered internally. Returns
 *  the new state. See also <code>IO#fsync</code>.
 *
 *     f = File.new("testfile")
 *     f.sync = true
 *
 *  <em>(produces no output)</em>
 */

static VALUE
rb_io_set_sync(VALUE io, VALUE sync)
{
    rb_io_t *fptr;

    io = GetWriteIO(io);
    GetOpenFile(io, fptr);
    if (RTEST(sync)) {
    fptr->mode |= FMODE_SYNC;
    }
    else {
    fptr->mode &= ~FMODE_SYNC;
    }
    return sync;
};F

Version data entries

12 entries across 12 versions & 2 rubygems

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