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 Yegor Bugayenko

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(loog) ⇒ Inspect

Returns a new instance of Inspect.



35
36
37
# File 'lib/judges/commands/inspect.rb', line 35

def initialize(loog)
  @loog = loog
end

Instance Method Details

#run(_opts, args) ⇒ Object



39
40
41
42
43
# File 'lib/judges/commands/inspect.rb', line 39

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