Class: GirFFI::Builders::FieldBuilder::GetterArgumentInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/gir_ffi/builders/field_builder.rb

Overview

Class to represent argument info for the argument of a getter method. Implements the necessary parts of IArgumentInfo’s interface.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type) ⇒ GetterArgumentInfo

Returns a new instance of GetterArgumentInfo.



98
99
100
101
# File 'lib/gir_ffi/builders/field_builder.rb', line 98

def initialize(name, type)
  @name = name
  @argument_type = type
end

Instance Attribute Details

#argument_typeObject (readonly)

Returns the value of attribute argument_type.



96
97
98
# File 'lib/gir_ffi/builders/field_builder.rb', line 96

def argument_type
  @argument_type
end

#nameObject (readonly)

Returns the value of attribute name.



96
97
98
# File 'lib/gir_ffi/builders/field_builder.rb', line 96

def name
  @name
end

Instance Method Details

#caller_allocates?Boolean

Returns:

  • (Boolean)


119
120
121
# File 'lib/gir_ffi/builders/field_builder.rb', line 119

def caller_allocates?
  false
end

#closureObject



103
104
105
# File 'lib/gir_ffi/builders/field_builder.rb', line 103

def closure
  -1
end

#destroyObject



107
108
109
# File 'lib/gir_ffi/builders/field_builder.rb', line 107

def destroy
  -1
end

#directionObject



111
112
113
# File 'lib/gir_ffi/builders/field_builder.rb', line 111

def direction
  :out
end

#ownership_transferObject



115
116
117
# File 'lib/gir_ffi/builders/field_builder.rb', line 115

def ownership_transfer
  :everything
end

#skip?Boolean

Returns:

  • (Boolean)


123
124
125
# File 'lib/gir_ffi/builders/field_builder.rb', line 123

def skip?
  false
end