Parent

Methods

SleepyPenguin::Inotify::Event

Returned by SleepyPenguin::Inotify#take. It is a Struct with the following elements:

The mask is a bitmask of the event flags accepted by Inotify#add_watch and may also include the following flags:

Use the Event#events method to get an array of symbols for the matched events.

Public Instance Methods

events => [ :MOVED_TO, ... ] view method source

Returns an array of symbolic event names based on the contents of the mask field.

static VALUE events(VALUE self)
{
        long len = RARRAY_LEN(checks);
        VALUE *ptr = RARRAY_PTR(checks);
        VALUE sym;
        VALUE rv = rb_ary_new();
        uint32_t mask;
        uint32_t event_mask = NUM2UINT(rb_funcall(self, id_mask, 0));

        for (; (len -= 2) >= 0;) {
                sym = *ptr++;
                mask = NUM2UINT(*ptr++);
                if ((event_mask & mask) == mask)
                        rb_ary_push(rv, sym);
        }

        return rv;
}

Originally generated with the Darkfish Rdoc Generator 2, modified by wrongdoc.

We love to hear from you!
Email patches (with git send-email), pull requests, questions, bug reports, suggestions, etc. to us publically at sleepy.penguin@librelist.org.
To subscribe, just send any email to sleepy.penguin@librelist.org, and respond to the automated confirmation message.
Do not waste bandwidth with HTML, HTML mail will not be read.
Quote only parts you're responding to and do not top post.
For sensitive topics, email us privately at sleepy.penguin@bogomips.org.