Class: InfraTestingHelpers::Site

Inherits:
Object
  • Object
show all
Defined in:
lib/infra_testing_helpers/site.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(site_code, module_path) ⇒ Site

Returns a new instance of Site.



4
5
6
7
8
# File 'lib/infra_testing_helpers/site.rb', line 4

def initialize(site_code, module_path)
  @site_code = site_code
  @module_path = module_path
  @manifest_code = ""
end

Instance Attribute Details

#module_pathObject (readonly)

Returns the value of attribute module_path.



10
11
12
# File 'lib/infra_testing_helpers/site.rb', line 10

def module_path
  @module_path
end

Instance Method Details

#add_manifest(manifest) ⇒ Object



12
13
14
# File 'lib/infra_testing_helpers/site.rb', line 12

def add_manifest(manifest)
  @manifest_code << "#{manifest}\n"
end

#puppet_codeObject



16
17
18
# File 'lib/infra_testing_helpers/site.rb', line 16

def puppet_code
  "#{@site_code}\n#{@manifest_code}"
end