Sha256: c8cad0e72da77ab94f61e1fc783257c20712625f67b3b2e916a32f01cd8bb055
Contents?: true
Size: 866 Bytes
Versions: 25
Compression:
Stored size: 866 Bytes
Contents
# frozen_string_literal: true require 'erb' module RubyCritic module Generator module Text class Lint class << self TEMPLATE_PATH = File.expand_path('templates/lint.erb', __dir__) FILE_NAME = 'lint.txt'.freeze def file_directory @file_directory ||= Pathname.new(Config.root) end def file_pathname Pathname.new(file_directory).join FILE_NAME end def erb_template @erb_template ||= ERB.new(File.read(TEMPLATE_PATH), nil, '-') end end def initialize(analysed_module) @analysed_module = analysed_module end def render erb_template.result(binding) end private def erb_template self.class.erb_template end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems