Class: Polycrystal::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/polycrystal/loader.rb,
ext/polycrystal/polycrystal.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(compiler:) ⇒ Loader

Returns a new instance of Loader.



7
8
9
# File 'lib/polycrystal/loader.rb', line 7

def initialize(compiler:)
  @compiler = compiler
end

Instance Attribute Details

#compilerObject (readonly)

Returns the value of attribute compiler.



5
6
7
# File 'lib/polycrystal/loader.rb', line 5

def compiler
  @compiler
end

Instance Method Details

#loadObject



11
12
13
14
15
# File 'lib/polycrystal/loader.rb', line 11

def load
  compiler.prepare
  library = compiler.execute
  load_library(library) # load_library is defined in C file
end