1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# frozen_string_literal: true
module GObjectIntrospection
# Wraps a GIPropertyInfo struct.
# Represents a property of an IObjectInfo or an IInterfaceInfo.
class IPropertyInfo < IBaseInfo
def property_type
@property_type ||= ITypeInfo.wrap Lib.g_property_info_get_type(self)
end
def flags
@flags ||= Lib.g_property_info_get_flags self
end
def readable?
flags[:readable]
end
def writeable?
flags[:writable]
end
def construct?
flags[:construct]
end
def construct_only?
flags[:construct_only]
end
end
end
|