Method: NginxConfig.read_nginx_group
- Defined in:
- lib/utils/nginx_parser.rb
.read_nginx_group(t) ⇒ Object
76 77 78 79 80 81 82 83 84 |
# File 'lib/utils/nginx_parser.rb', line 76 def self.read_nginx_group(t) agg_conf = Hash.new([]) agg_conf['_'] = t.args unless t.args == '' groups, conf = t.body.partition { |i| i.is_a? NginxTransform::Group } conf.each { |x| agg_conf[x.key] += [x.vals] } groups.each { |x| agg_conf[x.id] += [read_nginx_group(x)] } agg_conf end |