Class: Cf::Templates::FileTemplateProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/cf/templates.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/cf/templates.rb', line 7

def id
  @id
end

#template_locationObject (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_templateObject



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