apache-config-generator/lib/apache/directory.rb
2010-05-18 13:08:17 -04:00

26 lines
777 B
Ruby

module Apache
# Methods to handle directory settings
module Directories
# Create an Options directive
#
# The options passed into this method are Apachified:
# options :exec_cgi, :follow_sym_links #=> Options ExecCGI FollowSymLinks
def options(*opt)
create_options_list('options'.apachify, *opt)
end
# Create an IndexOptions directive
#
# The options passed into this method are Apachified:
# index_options :fancy_indexing, :suppress_description #=> IndexOptions FancyIndexing SuppressDescription
def index_options(*opt)
create_options_list('index_options'.apachify, *opt)
end
private
def create_options_list(tag, *opt)
self << "#{tag} #{opt.collect(&:optionify) * " "}"
end
end
end