class PRGen::Generator
Attributes
pr_id[R]
task_id[R]
Public Class Methods
new(task_id, pr_id)
click to toggle source
# File lib/prgen/generator.rb 5 def initialize task_id, pr_id 6 @template, @has_template = 7 begin 8 [open(PRGen::TEMPLATE_PATH, "r") {|file| file.read}, true] 9 rescue Errno::ENOENT => e 10 ["", false] 11 end 12 @task_id = task_id 13 @pr_id = pr_id 14 end
Public Instance Methods
render()
click to toggle source
# File lib/prgen/generator.rb 16 def render 17 {has_template: @has_template, message: ERB.new(@template).result(binding)} 18 end