Class: GirFFI::Builders::BaseMethodBuilder
- Inherits:
-
Object
- Object
- GirFFI::Builders::BaseMethodBuilder
- Defined in:
- lib/gir_ffi/builders/base_method_builder.rb
Overview
Base class for method definition builders.
Direct Known Subclasses
FunctionBuilder, InitializerBuilder, MappingMethodBuilder, MarshallingMethodBuilder
Instance Method Summary collapse
-
#initialize(info, return_value_builder_class, receiver_info: nil, argument_builder_class: ArgumentBuilder) ⇒ BaseMethodBuilder
constructor
A new instance of BaseMethodBuilder.
-
#invocation ⇒ Object
Methods used by MethodTemplate.
- #method_arguments ⇒ Object
- #method_definition ⇒ Object
- #preparation ⇒ Object
Constructor Details
#initialize(info, return_value_builder_class, receiver_info: nil, argument_builder_class: ArgumentBuilder) ⇒ BaseMethodBuilder
Returns a new instance of BaseMethodBuilder.
15 16 17 18 19 20 21 22 |
# File 'lib/gir_ffi/builders/base_method_builder.rb', line 15 def initialize(info, return_value_builder_class, receiver_info: nil, argument_builder_class: ArgumentBuilder) @info = info @return_value_builder_class = return_value_builder_class @argument_builder_class = argument_builder_class @receiver_info = receiver_info end |
Instance Method Details
#invocation ⇒ Object
Methods used by MethodTemplate
30 31 32 |
# File 'lib/gir_ffi/builders/base_method_builder.rb', line 30 def invocation "#{lib_name}.#{@info.symbol} #{function_call_arguments.join(", ")}".strip end |
#method_arguments ⇒ Object
34 35 36 |
# File 'lib/gir_ffi/builders/base_method_builder.rb', line 34 def method_arguments argument_builder_collection.method_argument_names end |
#method_definition ⇒ Object
24 25 26 |
# File 'lib/gir_ffi/builders/base_method_builder.rb', line 24 def method_definition template.method_definition end |
#preparation ⇒ Object
38 39 40 |
# File 'lib/gir_ffi/builders/base_method_builder.rb', line 38 def preparation [] end |