class PrologFeedbackHook::PrologExplainer
Public Instance Methods
explain_clauses_not_together(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 29 def explain_clauses_not_together(_, test_results) (/Clauses of .*:(.*) are not together in the source-file/.match test_results).try do |it| {target: it[1]} end end
explain_missing_dot_error(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 55 def explain_missing_dot_error(_, test_results) /ERROR: (.*): Syntax error: Operator priority clash/ =~ test_results end
explain_missing_predicate(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 64 def explain_missing_predicate(_, test_results) (/.*:(.*): Undefined procedure: .*:(.*)/.match test_results).try do |it| {target: it[1], missing: it[2]} unless it[1].include? 'unit body' end end
explain_not_sufficiently_instantiated(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 45 def explain_not_sufficiently_instantiated(_, test_results) (/received error: (.*): Arguments are not sufficiently instantiated/.match test_results).try do |it| {target: it[1]} end end
explain_operator_error(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 51 def explain_operator_error(_, test_results) /ERROR: (.*): Syntax error: Operator expected/ =~ test_results end
explain_singleton_variables(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 35 def explain_singleton_variables(_, test_results) (/Singleton variables: \[(.*)\]/.match test_results).try do |it| {target: it[1]} end end
explain_test_failed(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 41 def explain_test_failed(_, test_results) /test (.*): failed/ =~ test_results end
explain_wrong_comma(_, test_results)
click to toggle source
# File lib/feedback_hook.rb, line 60 def explain_wrong_comma(_, test_results) /ERROR: (.*): Full stop in clause-body\? Cannot redefine ,\/2/ =~ test_results end
explain_wrong_distinct_operator(content, _)
click to toggle source
# File lib/feedback_hook.rb, line 10 def explain_wrong_distinct_operator(content, _) (/.{0,9}(\/=|<>|!=).{0,9}/.match content).try do |it| {near: it[0]} end end
explain_wrong_gte_operator(content, _)
click to toggle source
# File lib/feedback_hook.rb, line 16 def explain_wrong_gte_operator(content, _) (/.{0,9}(=>).{0,9}/.match content).try do |it| {near: it[0]} end end
explain_wrong_lte_operator(content, _)
click to toggle source
# File lib/feedback_hook.rb, line 22 def explain_wrong_lte_operator(content, _) (/.{0,9}(<=).{0,9}/.match content).try do |it| {near: it[0]} end end