Sha256: aa23928776360e928ff8ea558929f7f722427bec46a91b2b3d9546e88b217bfb
Contents?: true
Size: 709 Bytes
Versions: 17
Compression:
Stored size: 709 Bytes
Contents
require "foreman/export" require "foreman/utils" class Foreman::Export::Base attr_reader :engine def initialize(engine) @engine = engine end def export raise "export method must be overridden" end private ###################################################################### def error(message) raise Foreman::Export::Exception.new(message) end def say(message) puts "[foreman export] %s" % message end def export_template(name) File.read(File.expand_path("../../../../data/export/#{name}", __FILE__)) end def write_file(filename, contents) say "writing: #{filename}" File.open(filename, "w") do |file| file.puts contents end end end
Version data entries
17 entries across 17 versions & 1 rubygems