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.



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

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

Instance Attribute Details

#argument_typeObject (readonly)

Returns the value of attribute argument_type.



94
95
96
# File 'lib/gir_ffi/builders/field_builder.rb', line 94

def argument_type
  @argument_type
end

#nameObject (readonly)

Returns the value of attribute name.



94
95
96
# File 'lib/gir_ffi/builders/field_builder.rb', line 94

def name
  @name
end

Instance Method Details

#caller_allocates?Boolean

Returns:

  • (Boolean)


117
118
119
# File 'lib/gir_ffi/builders/field_builder.rb', line 117

def caller_allocates?
  false
end

#closureObject



101
102
103
# File 'lib/gir_ffi/builders/field_builder.rb', line 101

def closure
  -1
end

#destroyObject



105
106
107
# File 'lib/gir_ffi/builders/field_builder.rb', line 105

def destroy
  -1
end

#directionObject



109
110
111
# File 'lib/gir_ffi/builders/field_builder.rb', line 109

def direction
  :out
end

#ownership_transferObject



113
114
115
# File 'lib/gir_ffi/builders/field_builder.rb', line 113

def ownership_transfer
  :everything
end

#skip?Boolean

Returns:

  • (Boolean)


121
122
123
# File 'lib/gir_ffi/builders/field_builder.rb', line 121

def skip?
  false
end