Sha256: 1bb2b0fd14b20770d2b39271a167f6cd4ea26be1d20742b968e08fdd27b0d355
Contents?: true
Size: 720 Bytes
Versions: 2
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true module Fixturizer module Getters class Template attr_reader :filename, :data def initialize(filename:, options: nil) @filename = filename @options = options end def retrieve raise "Abstract template, don't use" end def read_file(file) return File.readlines(file).join rescue Errno::EACCES puts "Error: Permission denied to read the file #{file}." rescue StandardError => e puts "Error: #{e.message}" end end end end Dir["#{File.dirname(__FILE__)}/*.rb"].each { |file| require file unless File.basename(file) == 'init.rb' }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fixturizer-0.4.4 | lib/fixturizer/getters/init.rb |
fixturizer-0.4.3 | lib/fixturizer/getters/init.rb |