Sha256: 130edf208f919dbacf2410f215a7e99a5982912a479ff9e7b16cfa0931728f95
Contents?: true
Size: 944 Bytes
Versions: 1
Compression:
Stored size: 944 Bytes
Contents
module Cardio module 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 return PatternTmpFiles if strategy == :tmp_files Eval end def tmp_files? Cardio.config.load_strategy == :tmp_files end end attr_reader :loader delegate :template_class, :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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
card-1.102.0 | lib/cardio/mod/load_strategy.rb |