lib/polycrystal/loader.rb in polycrystal-0.1.2 vs lib/polycrystal/loader.rb in polycrystal-0.1.3
- old
+ new
@@ -1,20 +1,15 @@
# frozen_string_literal: true
module Polycrystal
class Loader
- attr_reader :build_path, :registry
+ attr_reader :compiler
- def initialize(build_path:, registry: Polycrystal::Registry.instance)
- @build_path = build_path
- @registry = registry
+ def initialize(compiler:)
+ @compiler = compiler
end
def load
- compiler = Polycrystal::Compiler.new(
- build_path: build_path,
- registry: registry
- )
compiler.prepare
library = compiler.execute
load_library(library) # load_library is defined in C file
end
end