Class: Inspec::Resources::IisApp
- Inherits:
-
Object
- Object
- Inspec::Resources::IisApp
- Defined in:
- lib/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
- #site_name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(path, site_name) ⇒ IisApp
Returns a new instance of IisApp.
21 22 23 24 25 26 |
# File 'lib/resources/iis_app.rb', line 21 def initialize(path, site_name) @path = path @site_name = site_name @cache = nil @inspec = inspec end |
Instance Method Details
#application_pool ⇒ Object
28 29 30 |
# File 'lib/resources/iis_app.rb', line 28 def application_pool iis_app[:application_pool] end |
#exists? ⇒ Boolean
48 49 50 |
# File 'lib/resources/iis_app.rb', line 48 def exists? !iis_app[:path].empty? end |
#has_application_pool?(application_pool) ⇒ Boolean
56 57 58 |
# File 'lib/resources/iis_app.rb', line 56 def has_application_pool?(application_pool) iis_app[:application_pool] == application_pool end |
#has_path?(path) ⇒ Boolean
60 61 62 |
# File 'lib/resources/iis_app.rb', line 60 def has_path?(path) iis_app[:path] == path end |
#has_physical_path?(physical_path) ⇒ Boolean
64 65 66 |
# File 'lib/resources/iis_app.rb', line 64 def has_physical_path?(physical_path) iis_app[:physical_path] == physical_path end |
#has_protocol?(protocol) ⇒ Boolean
68 69 70 |
# File 'lib/resources/iis_app.rb', line 68 def has_protocol?(protocol) iis_app[:protocols].include?(protocol) end |
#has_site_name?(site_name) ⇒ Boolean
52 53 54 |
# File 'lib/resources/iis_app.rb', line 52 def has_site_name?(site_name) iis_app[:site_name] == site_name end |
#path ⇒ Object
40 41 42 |
# File 'lib/resources/iis_app.rb', line 40 def path iis_app[:path] end |
#physical_path ⇒ Object
44 45 46 |
# File 'lib/resources/iis_app.rb', line 44 def physical_path iis_app[:physical_path] end |
#protocols ⇒ Object
32 33 34 |
# File 'lib/resources/iis_app.rb', line 32 def protocols iis_app[:protocols] end |
#site_name ⇒ Object
36 37 38 |
# File 'lib/resources/iis_app.rb', line 36 def site_name iis_app[:site_name] end |
#to_s ⇒ Object
72 73 74 |
# File 'lib/resources/iis_app.rb', line 72 def to_s "iis_app '#{@site_name}#{@path}'" end |