Class: Avm::Files::Appendable::TemplatizedDirectory
- Inherits:
-
ResourceBase
- Object
- ResourceBase
- Avm::Files::Appendable::TemplatizedDirectory
- Defined in:
- lib/avm/files/appendable/templatized_directory.rb
Instance Attribute Summary collapse
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
Instance Method Summary collapse
-
#initialize(appender, source_path) ⇒ TemplatizedDirectory
constructor
A new instance of TemplatizedDirectory.
- #write_on(target_dir) ⇒ Object
Constructor Details
#initialize(appender, source_path) ⇒ TemplatizedDirectory
Returns a new instance of TemplatizedDirectory.
13 14 15 16 |
# File 'lib/avm/files/appendable/templatized_directory.rb', line 13 def initialize(appender, source_path) super(appender) @source_path = source_path end |
Instance Attribute Details
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path.
11 12 13 |
# File 'lib/avm/files/appendable/templatized_directory.rb', line 11 def source_path @source_path end |
Instance Method Details
#write_on(target_dir) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/avm/files/appendable/templatized_directory.rb', line 18 def write_on(target_dir) raise 'Variables source not set' if appender.variables_source.blank? ::EacTemplates::Directory.new(source_path).apply( appender.variables_source, target_dir ) end |