Class: GirFFI::Builders::FieldBuilder::GetterBuilder

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

Overview

Builder for field getters TODO: Derive from BaseMethodBuilder

Instance Method Summary collapse

Constructor Details

#initialize(info) ⇒ GetterBuilder

Returns a new instance of GetterBuilder.



138
139
140
# File 'lib/gir_ffi/builders/field_builder.rb', line 138

def initialize(info)
  @info = info
end

Instance Method Details

#invocationObject



162
163
164
# File 'lib/gir_ffi/builders/field_builder.rb', line 162

def invocation
  nil
end

#method_argumentsObject



154
155
156
# File 'lib/gir_ffi/builders/field_builder.rb', line 154

def method_arguments
  []
end

#method_definitionObject



142
143
144
# File 'lib/gir_ffi/builders/field_builder.rb', line 142

def method_definition
  template.method_definition
end

#method_nameObject



150
151
152
# File 'lib/gir_ffi/builders/field_builder.rb', line 150

def method_name
  @info.name
end

#preparationObject



158
159
160
# File 'lib/gir_ffi/builders/field_builder.rb', line 158

def preparation
  []
end

#resultObject



166
167
168
# File 'lib/gir_ffi/builders/field_builder.rb', line 166

def result
  [getter_argument_builder.return_value_name]
end

#singleton_method?Boolean

Returns:



146
147
148
# File 'lib/gir_ffi/builders/field_builder.rb', line 146

def singleton_method?
  false
end