Class: Cf::Templates::FileTemplateProvider
- Inherits:
-
Object
- Object
- Cf::Templates::FileTemplateProvider
- Defined in:
- lib/cf/templates.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#template_location ⇒ Object
readonly
Returns the value of attribute template_location.
Instance Method Summary collapse
- #get_template ⇒ Object
-
#initialize(id) ⇒ FileTemplateProvider
constructor
A new instance of FileTemplateProvider.
- #set_template_location(template_file_path) ⇒ Object
Constructor Details
#initialize(id) ⇒ FileTemplateProvider
Returns a new instance of FileTemplateProvider.
9 10 11 |
# File 'lib/cf/templates.rb', line 9 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/cf/templates.rb', line 7 def id @id end |
#template_location ⇒ Object (readonly)
Returns the value of attribute template_location.
7 8 9 |
# File 'lib/cf/templates.rb', line 7 def template_location @template_location end |
Instance Method Details
#get_template ⇒ Object
17 18 19 |
# File 'lib/cf/templates.rb', line 17 def get_template File.open(@template_location, 'rb').read end |
#set_template_location(template_file_path) ⇒ Object
13 14 15 |
# File 'lib/cf/templates.rb', line 13 def set_template_location(template_file_path) @template_location = template_file_path end |