Sha256: 93fe8368ae1e965853ed013d0e5fc1cc2f362e55edc90776683428c76cd12de7
Contents?: true
Size: 872 Bytes
Versions: 4
Compression:
Stored size: 872 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), trim_mode: '-') 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
4 entries across 4 versions & 1 rubygems