class Taeval::Plagium::Config
Attributes
comment[R]
id[R]
language[R]
max_matches[R]
output[R]
reject[R]
show_num_matches[R]
solutions[R]
Public Class Methods
new(conf_h)
click to toggle source
# File lib/taeval/plagium/config.rb, line 9 def initialize(conf_h) @id = conf_h.fetch('id', '') @language = conf_h.fetch('language', 'ascii') @max_matches = conf_h.fetch('max_matches', 10) @show_num_matches = conf_h.fetch('show_num_matches', 250) @comment = conf_h.fetch('comment', '') output_path = conf_h.fetch('output', '') @output = File.new(path_of(output_path), 'w') @reject = conf_h.fetch('reject', '') @solutions = path_of(conf_h.dig('solution', 'path')) if !File.exist?(@solutions) raise "Plagium: Path of input solutions not exists: #{@solutions}" end end