Sha256: b2cda82df464e34595d6e1c7047849e5d61969bee9e3d4fd06fc8782e6d68ced
Contents?: true
Size: 958 Bytes
Versions: 5
Compression:
Stored size: 958 Bytes
Contents
module Cardio class Mod # Shared code for the three different load strategies: Eval, TmpFiles and BindingMagic class LoadStrategy class << self attr_accessor :tmp_files, :current def class_for_set strategy case strategy when :tmp_files then SetTmpFiles when :binding_magic then SetBindingMagic else Eval end end def class_for_set_pattern strategy strategy == :tmp_files ? PatternTmpFiles : Eval end def tmp_files? Cardio.config.load_strategy == :tmp_files end end attr_reader :loader delegate :template_class, :pattern_groups, :each_file, :mod_dirs, :parts_from_path, to: :loader def initialize loader LoadStrategy.current = self.class @loader = loader end def clean_comments? false end end end end
Version data entries
5 entries across 5 versions & 1 rubygems