Module: Polycrystal
- Defined in:
- lib/polycrystal.rb,
lib/polycrystal/loader.rb,
lib/polycrystal/version.rb,
lib/polycrystal/compiler.rb,
lib/polycrystal/registry.rb,
ext/polycrystal/polycrystal.c
Defined Under Namespace
Classes: Compiler, Error, Loader, Registry
Constant Summary collapse
- PRECOMPILE =
[ NO_PRECOMPILE = :no_precompile, LAZY_COMPILE = :lazy_compile, REQUIRE_AOT = :require_compiled ].freeze
- VERSION =
'0.1.3'
Class Method Summary collapse
Class Method Details
.load(build_path: nil, shardfile: nil, precompile: LAZY_COMPILE) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/polycrystal.rb', line 18 def self.load(build_path: nil, shardfile: nil, precompile: LAZY_COMPILE) build_path ||= "#{Dir.pwd}/build" shardfile ||= "#{Dir.pwd}/shard.yml" if File.exist?("#{Dir.pwd}/shard.yml") shardfile ||= "#{Dir.pwd}/crystal/shard.yml" if File.exist?("#{Dir.pwd}/crystal/shard.yml") compiler = Polycrystal::Compiler.new(build_path: build_path, shardfile: shardfile, precompile: precompile) Polycrystal::Loader.new(compiler: compiler).load end |