Class: GirFFI::UserDefinedPropertyInfo
- Inherits:
-
Object
- Object
- GirFFI::UserDefinedPropertyInfo
show all
- Defined in:
- lib/gir_ffi/user_defined_property_info.rb
Overview
Represents a property of a user defined type. Wraps a GParamSpec with useful helper methods for building property accessors etc.
Defined Under Namespace
Classes: UserDefinedTypeInfo
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
105
106
107
108
109
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 105
def initialize(param_spec, container, offset)
@param_spec = param_spec
@container = container
@offset = offset
end
|
Instance Attribute Details
#container ⇒ Object
Returns the value of attribute container.
111
112
113
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 111
def container
@container
end
|
#offset ⇒ Object
Returns the value of attribute offset.
111
112
113
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 111
def offset
@offset
end
|
#param_spec ⇒ Object
Returns the value of attribute param_spec.
111
112
113
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 111
def param_spec
@param_spec
end
|
Instance Method Details
#ffi_type ⇒ Object
129
130
131
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 129
def ffi_type
field_type.ffi_type
end
|
#field_symbol ⇒ Object
133
134
135
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 133
def field_symbol
name.to_sym
end
|
#field_type ⇒ Object
117
118
119
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 117
def field_type
@field_type ||= UserDefinedTypeInfo.new @param_spec
end
|
#name ⇒ Object
113
114
115
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 113
def name
@param_spec.accessor_name
end
|
121
122
123
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 121
def related_array_length_field
nil
end
|
125
126
127
|
# File 'lib/gir_ffi/user_defined_property_info.rb', line 125
def writable?
param_spec.flags[:writable]
end
|