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
A new instance of Join.
- #run(_opts, args) ⇒ Object
Constructor Details
#initialize(loog) ⇒ Join
Returns a new instance of Join.
19 20 21 |
# File 'lib/judges/commands/join.rb', line 19 def initialize(loog) @loog = loog end |
Instance Method Details
#run(_opts, args) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/judges/commands/join.rb', line 23 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' end end |