Sha256: 6d8ec2e0af2185eab2ee9c0afbc8c19c3869b6bff1a7e33edef803b2a03c7f7f

Contents?: true

Size: 615 Bytes

Versions: 1

Compression:

Stored size: 615 Bytes

Contents

module Groundwork
    class RecipeUnpacker < Recipe
        def directory *args, &block
            yield if block_given?
        end

        def file name, opts = nil
            if opts.is_a? Hash
                if filename = (opts[:from] || opts[:from_erb])
                    FileUtils.mkdir_p File.dirname(filename)
                    File.open(filename,"w"){|f| f.print read_file(filename) }
                end
            end
        end

        def possible filename
            File.open(filename,"w"){|f| f.print read_file(filename) }
        end

        def method_missing *args ; end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
groundwork-1.0.2 lib/recipe_unpacker.rb