Class: Judges::Join
Overview
Join.
- Author
-
Yegor Bugayenko (yegor256@gmail.com)
- Copyright
-
Copyright © 2024 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.
31 32 33 |
# File 'lib/judges/commands/join.rb', line 31 def initialize(loog) @loog = loog end |
Instance Method Details
#run(_opts, args) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/judges/commands/join.rb', line 35 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]) fb = master.import slave.import_to(fb) master.export(fb) end |