Class: Judge
- Inherits:
-
Object
- Object
- Judge
- Defined in:
- lib/kaba/judge.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input:, target:, output:) ⇒ Judge
constructor
A new instance of Judge.
- #render ⇒ Object
Constructor Details
#initialize(input:, target:, output:) ⇒ Judge
Returns a new instance of Judge.
4 5 6 7 8 |
# File 'lib/kaba/judge.rb', line 4 def initialize(input: , target: , output:) @input = input @target = target @output = output end |
Class Method Details
.prompt_path ⇒ Object
15 16 17 |
# File 'lib/kaba/judge.rb', line 15 def prompt_path @prompt_path || File.join(__dir__, 'judge.md.erb') end |
.set_prompt_path(path) ⇒ Object
19 20 21 |
# File 'lib/kaba/judge.rb', line 19 def set_prompt_path(path) @prompt_path = path end |
Instance Method Details
#render ⇒ Object
10 11 12 |
# File 'lib/kaba/judge.rb', line 10 def render ERB.new(File.read(self.class.prompt_path)).result(binding) end |