Class: Bosh::Director::Core::Templates::RenderedJobTemplate
- Inherits:
-
Object
- Object
- Bosh::Director::Core::Templates::RenderedJobTemplate
- Defined in:
- lib/bosh/director/core/templates/rendered_job_template.rb
Instance Attribute Summary collapse
-
#monit ⇒ Object
readonly
Returns the value of attribute monit.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
Instance Method Summary collapse
-
#initialize(name, monit, templates) ⇒ RenderedJobTemplate
constructor
A new instance of RenderedJobTemplate.
- #template_hash ⇒ Object
Constructor Details
#initialize(name, monit, templates) ⇒ RenderedJobTemplate
Returns a new instance of RenderedJobTemplate.
7 8 9 10 11 |
# File 'lib/bosh/director/core/templates/rendered_job_template.rb', line 7 def initialize(name, monit, templates) @name = name @monit = monit @templates = templates end |
Instance Attribute Details
#monit ⇒ Object (readonly)
Returns the value of attribute monit.
5 6 7 |
# File 'lib/bosh/director/core/templates/rendered_job_template.rb', line 5 def monit @monit end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/bosh/director/core/templates/rendered_job_template.rb', line 5 def name @name end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
5 6 7 |
# File 'lib/bosh/director/core/templates/rendered_job_template.rb', line 5 def templates @templates end |
Instance Method Details
#template_hash ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/bosh/director/core/templates/rendered_job_template.rb', line 13 def template_hash template_digest = Digest::SHA1.new template_digest << monit templates.sort { |x, y| x.src_name <=> y.src_name }.each do |template_file| template_digest << template_file.contents end template_digest.hexdigest end |