Class: Judges::Inspect

Inherits:
Object show all
Defined in:
lib/judges/commands/inspect.rb

Overview

The inspect 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

Constructor Details

#initialize(loog) ⇒ Inspect

Returns a new instance of Inspect.



18
19
20
# File 'lib/judges/commands/inspect.rb', line 18

def initialize(loog)
  @loog = loog
end

Instance Method Details

#run(_opts, args) ⇒ Object



22
23
24
25
26
# File 'lib/judges/commands/inspect.rb', line 22

def run(_opts, args)
  raise 'At lease one argument required' if args.empty?
  fb = Judges::Impex.new(@loog, args[0]).import
  @loog.info("Facts: #{fb.size}")
end