Sha256: d6490423701eadc7bda9ed75d11ad646a2391118d95fdb02336e541ce1dd1f9c
Contents?: true
Size: 497 Bytes
Versions: 11
Compression:
Stored size: 497 Bytes
Contents
# encoding: utf-8 require "fileutils" require "cli" # yes? etc class SimpleTemplater class DSL include FileUtils attr_reader :generator, :context def initialize(generator) @generator = generator @context = generator.context end def make_executable(path) sh "chmod +x '#{path}'" end def file(name, &block) File.open(name, "w", &block) end def hook(&block) block.call(self.generator, self.context) end end end
Version data entries
11 entries across 11 versions & 2 rubygems