class Inspec::Resources::NginxConfHttpEntry
Attributes
params[R]
parent[R]
Public Class Methods
new(params, parent)
click to toggle source
# File lib/inspec/resources/nginx_conf.rb, line 175 def initialize(params, parent) @params = params || {} @parent = parent end
Public Instance Methods
locations()
click to toggle source
# File lib/inspec/resources/nginx_conf.rb, line 184 def locations servers.map(&:locations).flatten end
method_missing(name)
click to toggle source
Calls superclass method
# File lib/inspec/resources/nginx_conf.rb, line 193 def method_missing(name) return super if name.to_s.match?(/^to_/) (@params[name.to_s] || []).flatten end
respond_to_missing?(name, include_all = false)
click to toggle source
Calls superclass method
# File lib/inspec/resources/nginx_conf.rb, line 199 def respond_to_missing?(name, include_all = false) return super if name.to_s.match?(/^to_/) true end
to_s()
click to toggle source
# File lib/inspec/resources/nginx_conf.rb, line 188 def to_s @parent.to_s + ", http entry" end
Also aliased as: inspect
Private Instance Methods
server_table()
click to toggle source
# File lib/inspec/resources/nginx_conf.rb, line 207 def server_table @server_table ||= (params["server"] || []).map { |x| { "server" => NginxConfServer.new(x, self) } } end