Sha256: d446abdb0a557385e32dbeefac1ae52eeadffb06a458bd419b37fb7a43734b03

Contents?: true

Size: 711 Bytes

Versions: 9

Compression:

Stored size: 711 Bytes

Contents

module Cardio
  module Mod
    class LoadStrategy
      # The {TmpFiles} load strategy version for set pattern modules/
      class PatternTmpFiles < TmpFiles
        private

        def generate_tmp_files
          prepare_tmp_dir "tmp/set_pattern"
          seq = 100
          each_file do |abs_path, const_parts|
            pattern = const_parts.first.underscore
            to_file = "#{tmp_dir}/#{seq}-#{pattern}.rb"
            write_tmp_file abs_path, to_file, const_parts
            seq += 1
          end
        end

        def load_tmp_files
          Loader.load_dir tmp_dir
        end

        def tmp_dir
          Card.paths["tmp/set_pattern"].first
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
card-1.101.7 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.102.0 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.101.6 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.101.5 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.101.4 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.101.3 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.101.2 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.101.1 lib/cardio/mod/load_strategy/pattern_tmp_files.rb
card-1.101.0 lib/cardio/mod/load_strategy/pattern_tmp_files.rb