Class: Yadriggy::C::NativeMethodType

Inherits:
OptionalRole show all
Defined in:
lib/yadriggy/c/ctypecheck.rb

Overview

Type for native methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OptionalRole

#==, #supertype

Methods inherited from Type

#!=, #<=, #copy, #eql?, error_found!, #exact_type, #has_role?, #name, role, #supertype

Constructor Details

#initialize(method_type, body_code) ⇒ NativeMethodType

Returns a new instance of NativeMethodType.

Parameters:

  • method_type (MethodType)

    a method type.

  • body_code (String)

    the body of a native method.



34
35
36
37
# File 'lib/yadriggy/c/ctypecheck.rb', line 34

def initialize(method_type, body_code)
  super(method_type)
  @body = body_code
end

Instance Attribute Details

#bodyString (readonly)

Returns the method body.

Returns:

  • (String)

    the method body.



30
31
32
# File 'lib/yadriggy/c/ctypecheck.rb', line 30

def body
  @body
end