module Gotta::Mod
Constants
- VERSION
Public Class Methods
hub()
click to toggle source
# File lib/gotta/mod.rb, line 20 def self.hub @@hub end
hub=(hub_instance)
click to toggle source
# File lib/gotta/mod.rb, line 16 def self.hub=(hub_instance) @@hub = hub_instance end
now(dir: Dir.pwd)
click to toggle source
# File lib/gotta/mod.rb, line 24 def self.now(dir: Dir.pwd) project = Gotta::Project.new(dir) Gotta::Project.config = project listener = Listener.new(working_directory: dir) self.hub = Hub.new(listener.queue) hub_thread = Thread.new {hub.start} # Hub runs on a separate thread. # Now require all `main.rb` files inside the mods folder Dir.glob("#{project.mods_dir}/*") do |f| rbfile = "#{f}/#{File.basename(f)}.rb" ModBuilder.class_eval(File.read(rbfile), rbfile) end hub.check_dependencies listener.start puts "Ready for action." sleep end