Class: Bosh::Director::RenderedJobTemplate
- Defined in:
- lib/bosh/director/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.
5 6 7 8 9 |
# File 'lib/bosh/director/rendered_job_template.rb', line 5 def initialize(name, monit, templates) @name = name @monit = monit @templates = templates end |
Instance Attribute Details
#monit ⇒ Object (readonly)
Returns the value of attribute monit.
3 4 5 |
# File 'lib/bosh/director/rendered_job_template.rb', line 3 def monit @monit end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/bosh/director/rendered_job_template.rb', line 3 def name @name end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
3 4 5 |
# File 'lib/bosh/director/rendered_job_template.rb', line 3 def templates @templates end |
Instance Method Details
#template_hash ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/bosh/director/rendered_job_template.rb', line 11 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 |