Class: Judges::Join
Overview
The join command.
This class is instantiated by the bin/judge command line interface. You are not supposed to instantiate it yourself.
- Author
-
Yegor Bugayenko ([email protected])
- Copyright
-
Copyright © 2024-2025 Yegor Bugayenko
- License
-
MIT
Instance Method Summary collapse
-
#initialize(loog) ⇒ Join
constructor
Initialize.
-
#run(_opts, args) ⇒ Object
Run the join command (called by the
bin/judgesscript).
Constructor Details
#initialize(loog) ⇒ Join
Initialize.
21 22 23 |
# File 'lib/judges/commands/join.rb', line 21 def initialize(loog) @loog = loog end |
Instance Method Details
#run(_opts, args) ⇒ Object
Run the join command (called by the bin/judges script).
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/judges/commands/join.rb', line 29 def run(_opts, args) raise 'Exactly two arguments required' unless args.size == 2 master = Judges::Impex.new(@loog, args[0]) slave = Judges::Impex.new(@loog, args[1]) elapsed(@loog, level: Logger::INFO) do fb = master.import slave.import_to(fb) master.export(fb) throw :'👍 Two factbases joined successfully' end end |