Class: Ikra::RubyIntegration::Implementation

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_core/ruby_integration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(num_params:, return_type:, implementation:, pass_self: true, expect_singleton_args: false) ⇒ Implementation

Returns a new instance of Implementation.



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/ruby_core/ruby_integration.rb', line 23

def initialize(
    num_params:, 
    return_type:, 
    implementation:, 
    pass_self: true, 
    expect_singleton_args: false)

    @num_params = num_params
    @implementation = implementation
    @pass_self = pass_self
    @return_type = return_type
    @expect_singleton_args = expect_singleton_args
end

Instance Attribute Details

#expect_singleton_argsObject (readonly)

If set to true, all argument should have a singleton type. This is required for operations on ArrayCommands (e.g., pzip).



21
22
23
# File 'lib/ruby_core/ruby_integration.rb', line 21

def expect_singleton_args
  @expect_singleton_args
end

#implementationObject (readonly)

Returns the value of attribute implementation.



15
16
17
# File 'lib/ruby_core/ruby_integration.rb', line 15

def implementation
  @implementation
end

#num_paramsObject (readonly)

Returns the value of attribute num_params.



14
15
16
# File 'lib/ruby_core/ruby_integration.rb', line 14

def num_params
  @num_params
end

#pass_selfObject (readonly)

Returns the value of attribute pass_self.



16
17
18
# File 'lib/ruby_core/ruby_integration.rb', line 16

def pass_self
  @pass_self
end

#return_typeObject (readonly)

Returns the value of attribute return_type.



17
18
19
# File 'lib/ruby_core/ruby_integration.rb', line 17

def return_type
  @return_type
end