Class: Inspec::Resources::IisApp

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

Instance Method Summary collapse

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_poolObject



27
28
29
# File 'lib/inspec/resources/iis_app.rb', line 27

def application_pool
  iis_app[:application_pool]
end

#exists?Boolean

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

#pathObject



39
40
41
# File 'lib/inspec/resources/iis_app.rb', line 39

def path
  iis_app[:path]
end

#physical_pathObject



43
44
45
# File 'lib/inspec/resources/iis_app.rb', line 43

def physical_path
  iis_app[:physical_path]
end

#protocolsObject



31
32
33
# File 'lib/inspec/resources/iis_app.rb', line 31

def protocols
  iis_app[:protocols]
end

#resource_idObject



75
76
77
# File 'lib/inspec/resources/iis_app.rb', line 75

def resource_id
  @path
end

#site_nameObject



35
36
37
# File 'lib/inspec/resources/iis_app.rb', line 35

def site_name
  iis_app[:site_name]
end

#to_sObject



71
72
73
# File 'lib/inspec/resources/iis_app.rb', line 71

def to_s
  "iis_app '#{@site_name}#{@path}'"
end