Sha256: dcce202e84845ad925064359db89f65ae6147cd38162b8d4f413b94921ad5fc0
Contents?: true
Size: 903 Bytes
Versions: 90
Compression:
Stored size: 903 Bytes
Contents
module Generator # Contains methods accessible to the ERB template class TemplateValues attr_reader :abbreviated_commit_hash, :version, :test_cases def initialize(abbreviated_commit_hash:, version:, test_cases:) @abbreviated_commit_hash = abbreviated_commit_hash @version = version @test_cases = test_cases end def get_binding binding end end module TemplateValuesFactory def template_values require cases_require_name TemplateValues.new( abbreviated_commit_hash: canonical_data.abbreviated_commit_hash, version: version, test_cases: test_cases_proc.call(canonical_data.to_s) ) end private def cases_require_name Files::GeneratorCases.filename(exercise_name) end def test_cases_proc Object.const_get(Files::GeneratorCases.proc_name(exercise_name)) end end end
Version data entries
90 entries across 90 versions & 1 rubygems