Class: Inspec::Resources::NginxConfHttpEntry
- Inherits:
-
Object
- Object
- Inspec::Resources::NginxConfHttpEntry
- Defined in:
- lib/inspec/resources/nginx_conf.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(params, parent) ⇒ NginxConfHttpEntry
constructor
A new instance of NginxConfHttpEntry.
- #locations ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize(params, parent) ⇒ NginxConfHttpEntry
Returns a new instance of NginxConfHttpEntry.
160 161 162 163 |
# File 'lib/inspec/resources/nginx_conf.rb', line 160 def initialize(params, parent) @params = params || {} @parent = parent end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
159 160 161 |
# File 'lib/inspec/resources/nginx_conf.rb', line 159 def params @params end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
159 160 161 |
# File 'lib/inspec/resources/nginx_conf.rb', line 159 def parent @parent end |
Instance Method Details
#locations ⇒ Object
169 170 171 |
# File 'lib/inspec/resources/nginx_conf.rb', line 169 def locations servers.map(&:locations).flatten end |
#to_s ⇒ Object Also known as: inspect
173 174 175 |
# File 'lib/inspec/resources/nginx_conf.rb', line 173 def to_s @parent.to_s + ", http entry" end |