Class: Tomahawk::Generators::HTTPd
- Defined in:
- lib/tomahawk/generators/httpd.rb
Instance Method Summary collapse
-
#initialize(httpd) ⇒ HTTPd
constructor
A new instance of HTTPd.
- #to_str ⇒ Object (also: #to_s)
Methods included from Tomahawk::Generators
#directive_group_name, #generate_directive
Constructor Details
#initialize(httpd) ⇒ HTTPd
Returns a new instance of HTTPd.
5 6 7 |
# File 'lib/tomahawk/generators/httpd.rb', line 5 def initialize(httpd) @httpd = httpd end |
Instance Method Details
#to_str ⇒ Object Also known as: to_s
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tomahawk/generators/httpd.rb', line 9 def to_str config = '' @httpd.directives.each do |directive, value| config += generate_directive(directive, value) end @httpd.groups.each do |group| config += group.to_conf end config end |