Class: GirFFI::Builder::Type::Enum

Inherits:
RegisteredType show all
Defined in:
lib/gir_ffi/builder/type/enum.rb

Overview

Implements the creation of an enum or flags type. The type will be attached to the appropriate namespace module, and will be defined as an enum for FFI.

Instance Attribute Summary

Attributes inherited from Base

#info

Instance Method Summary collapse

Methods inherited from Base

#build_class, #initialize

Methods included from GirFFI::BuilderHelper

#const_defined_for, #optionally_define_constant

Constructor Details

This class inherits a constructor from GirFFI::Builder::Type::Base

Instance Method Details

#pretty_printObject



10
11
12
# File 'lib/gir_ffi/builder/type/enum.rb', line 10

def pretty_print
  "#{@classname} = Lib.enum #{enum_sym.inspect}, #{value_spec.inspect}"
end