Class: Inspec::Resources::IisApp
- Inherits:
-
Object
- Object
- Inspec::Resources::IisApp
- Defined in:
- lib/inspec/resources/iis_app.rb
Instance Method Summary collapse
- #application_pool ⇒ Object
- #exists? ⇒ Boolean
- #has_application_pool?(application_pool) ⇒ Boolean
- #has_path?(path) ⇒ Boolean
- #has_physical_path?(physical_path) ⇒ Boolean
- #has_protocol?(protocol) ⇒ Boolean
- #has_site_name?(site_name) ⇒ Boolean
-
#initialize(path, site_name) ⇒ IisApp
constructor
A new instance of IisApp.
- #path ⇒ Object
- #physical_path ⇒ Object
- #protocols ⇒ Object
- #resource_id ⇒ Object
- #site_name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(path, site_name) ⇒ IisApp
Returns a new instance of IisApp.
20 21 22 23 24 25 |
# File 'lib/inspec/resources/iis_app.rb', line 20 def initialize(path, site_name) @path = path @site_name = site_name @cache = nil @inspec = inspec end |
Instance Method Details
#application_pool ⇒ Object
27 28 29 |
# File 'lib/inspec/resources/iis_app.rb', line 27 def application_pool iis_app[:application_pool] end |
#exists? ⇒ Boolean
47 48 49 |
# File 'lib/inspec/resources/iis_app.rb', line 47 def exists? !iis_app[:path].empty? end |
#has_application_pool?(application_pool) ⇒ Boolean
55 56 57 |
# File 'lib/inspec/resources/iis_app.rb', line 55 def has_application_pool?(application_pool) iis_app[:application_pool] == application_pool end |
#has_path?(path) ⇒ Boolean
59 60 61 |
# File 'lib/inspec/resources/iis_app.rb', line 59 def has_path?(path) iis_app[:path] == path end |
#has_physical_path?(physical_path) ⇒ Boolean
63 64 65 |
# File 'lib/inspec/resources/iis_app.rb', line 63 def has_physical_path?(physical_path) iis_app[:physical_path] == physical_path end |
#has_protocol?(protocol) ⇒ Boolean
67 68 69 |
# File 'lib/inspec/resources/iis_app.rb', line 67 def has_protocol?(protocol) iis_app[:protocols].include?(protocol) end |
#has_site_name?(site_name) ⇒ Boolean
51 52 53 |
# File 'lib/inspec/resources/iis_app.rb', line 51 def has_site_name?(site_name) iis_app[:site_name] == site_name end |
#path ⇒ Object
39 40 41 |
# File 'lib/inspec/resources/iis_app.rb', line 39 def path iis_app[:path] end |
#physical_path ⇒ Object
43 44 45 |
# File 'lib/inspec/resources/iis_app.rb', line 43 def physical_path iis_app[:physical_path] end |
#protocols ⇒ Object
31 32 33 |
# File 'lib/inspec/resources/iis_app.rb', line 31 def protocols iis_app[:protocols] end |
#resource_id ⇒ Object
75 76 77 |
# File 'lib/inspec/resources/iis_app.rb', line 75 def resource_id @path end |
#site_name ⇒ Object
35 36 37 |
# File 'lib/inspec/resources/iis_app.rb', line 35 def site_name iis_app[:site_name] end |
#to_s ⇒ Object
71 72 73 |
# File 'lib/inspec/resources/iis_app.rb', line 71 def to_s "iis_app '#{@site_name}#{@path}'" end |