Class: Inspec::Resources::NginxConfHttpEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/resources/nginx_conf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params, parent) ⇒ NginxConfHttpEntry

Returns a new instance of NginxConfHttpEntry.



153
154
155
156
# File 'lib/resources/nginx_conf.rb', line 153

def initialize(params, parent)
  @params = params || {}
  @parent = parent
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



152
153
154
# File 'lib/resources/nginx_conf.rb', line 152

def params
  @params
end

#parentObject (readonly)

Returns the value of attribute parent.



152
153
154
# File 'lib/resources/nginx_conf.rb', line 152

def parent
  @parent
end

Instance Method Details

#locationsObject



162
163
164
# File 'lib/resources/nginx_conf.rb', line 162

def locations
  servers.map(&:locations).flatten
end

#to_sObject Also known as: inspect



166
167
168
# File 'lib/resources/nginx_conf.rb', line 166

def to_s
  @parent.to_s + ', http entry'
end