class Bosh::Cli::DeploymentManifestCompiler

Attributes

properties[RW]

Public Class Methods

new(raw_manifest) click to toggle source
# File lib/cli/deployment_manifest_compiler.rb, line 7
def initialize(raw_manifest)
  @raw_manifest = raw_manifest
  @properties = {}
end

Public Instance Methods

property(name) click to toggle source
# File lib/cli/deployment_manifest_compiler.rb, line 12
def property(name)
  @properties[name] || raise(UndefinedProperty,
                             "Cannot resolve deployment property `#{name}'")
end
result() click to toggle source
# File lib/cli/deployment_manifest_compiler.rb, line 17
def result
  ERB.new(@raw_manifest).result(binding.taint)
rescue SyntaxError => e
  raise MalformedManifest,
        "Deployment manifest contains a syntax error\n" + e.to_s
end