class GLib::Flags - glib2-3.1.1 Documentation

# class GLib::Flags

### Public Class Methods

_load(obj) click to toggle source

    # File lib/glib2.rb, line 170
    def self._load(obj)
      new(Marshal.load(obj))
    end

### Public Instance Methods

_dump(limit) click to toggle source

    # File lib/glib2.rb, line 166
    def _dump(limit)
      Marshal.dump(to_i, limit)
    end

inspect() click to toggle source

FIXME

    # File lib/glib2.rb, line 175
    def inspect
      values = self.class.values
      if values.find{|x| x == self }
        body = nick
      else
        a = values.select{|x| self >= x }
        a = a.reject{|x| a.find{|y| y > x } }
        body = a.empty? ? '{}' : a.map{|x| x.nick }.join('|')
      end
      format('#<%s %s>', self.class.inspect, body)
    end