Class: GObjectIntrospection::IConstantInfo
- Defined in:
- lib/ffi-gobject_introspection/i_constant_info.rb
Overview
Wraps a GIConstantInfo struct; represents a constant.
Constant Summary collapse
- TYPE_TAG_TO_UNION_MEMBER =
{ gint8: :v_int8, gint16: :v_int16, gint32: :v_int32, gint64: :v_int64, guint8: :v_uint8, guint16: :v_uint16, guint32: :v_uint32, guint64: :v_uint64, gdouble: :v_double, utf8: :v_string }
Instance Method Summary collapse
Methods inherited from IBaseInfo
#==, build_array_method, build_finder_method, #container, #deprecated?, #info_type, #initialize, make_finalizer, #name, #namespace, #safe_namespace, #to_ptr, wrap
Constructor Details
This class inherits a constructor from GObjectIntrospection::IBaseInfo
Instance Method Details
#constant_type ⇒ Object
25 26 27 |
# File 'lib/ffi-gobject_introspection/i_constant_info.rb', line 25 def constant_type ITypeInfo.wrap(Lib.g_constant_info_get_type @gobj) end |
#value ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/ffi-gobject_introspection/i_constant_info.rb', line 17 def value if type_tag == :utf8 raw_value.force_encoding("utf-8") else raw_value end end |