class GLib::Flags
Public Class Methods
Source
# File lib/glib2.rb, line 224 def try_convert(value) case value when self value when Integer, String, Symbol, Array begin new(value) rescue ArgumentError nil end else nil end end
Public Instance Methods
Source
# File lib/glib2.rb, line 249 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
FIXME