Class: Itamae::Resource::Template

Inherits:
RemoteFile show all
Defined in:
lib/itamae/resource/template.rb

Defined Under Namespace

Classes: RenderContext

Constant Summary

Constants inherited from RemoteFile

RemoteFile::SourceNotFoundError

Instance Attribute Summary

Attributes inherited from Base

#attributes, #current_attributes, #notifications, #recipe, #resource_name, #subscriptions, #updated

Instance Method Summary collapse

Methods inherited from File

#action_create, #action_delete, #action_edit, #set_current_attributes, #show_differences

Methods inherited from Base

#action_nothing, define_attribute, inherited, #initialize, #resource_type, #run

Constructor Details

This class inherits a constructor from Itamae::Resource::Base

Instance Method Details

#pre_actionObject



10
11
12
13
14
# File 'lib/itamae/resource/template.rb', line 10

def pre_action
  attributes.content = RenderContext.new(self).render_file(source_file)

  super
end