apache-config-generator/lib/apache/config.rb

26 lines
482 B
Ruby
Raw Normal View History

2010-04-27 20:11:47 +00:00
require 'apache/master'
2010-04-27 21:00:43 +00:00
require 'apache/permissions'
2010-04-27 20:11:47 +00:00
module Apache
class Config
class << self
include Apache::Master
include Apache::Quoteize
2010-04-27 21:00:43 +00:00
include Apache::Permissions
2010-04-27 20:11:47 +00:00
def build(target, &block)
@config = []
@indent = 0
self.instance_eval(&block)
puts @config * "\n"
#File.open(target, 'w') { |f| f.puts @config * "\n" }
end
end
block_methods :if_module, :directory, :virtual_host
end
end