Class: Judges::Inspect

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

Overview

Inspect.

Author

Yegor Bugayenko (yegor256@gmail.com)

Copyright

Copyright © 2024 Yegor Bugayenko

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(loog) ⇒ Inspect

Returns a new instance of Inspect.



31
32
33
# File 'lib/judges/commands/inspect.rb', line 31

def initialize(loog)
  @loog = loog
end

Instance Method Details

#run(_opts, args) ⇒ Object



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

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