class Bindgen::Processor::Inheritance::ToBody

Overview

Crystal body of the #to?(T.class) method, choosing the cast by T.

Defined in:

bindgen/processor/inheritance.cr

Instance Method Summary

Instance methods inherited from class Bindgen::Call::Body

to_code(call : Call, platform : Graph::Platform) : String to_code

Instance Method Detail

def branches : Hash(String, -> String | String) #

Code returning the cast instance, by target Crystal type name, or a Proc building it when the code is generated.


[View source]
def inherited=(inherited : Bool) #

Does the Crystal superclass also have a #to? method?


[View source]
def inherited? : Bool #

Does the Crystal superclass also have a #to? method?


[View source]
def to_code(call : Call, platform : Graph::Platform) : String #
Description copied from class Bindgen::Call::Body

Will be called by a Generator later on, passing in the call and the target platform.


[View source]