Class: ArchivesSpace::Template::Erb

Inherits:
Processor
  • Object
show all
Defined in:
lib/archivesspace/client/template.rb

Instance Attribute Summary

Attributes inherited from Processor

#data, #template

Instance Method Summary collapse

Methods inherited from Processor

#initialize, #read_template, #validate_template

Constructor Details

This class inherits a constructor from ArchivesSpace::Template::Processor

Instance Method Details

#extensionObject



46
47
48
# File 'lib/archivesspace/client/template.rb', line 46

def extension
  ".erb"
end

#processObject



50
51
52
53
54
# File 'lib/archivesspace/client/template.rb', line 50

def process
  t = ERB.new(read_template)
  r = t.result(binding).squeeze("\n")
  JSON.parse(r)
end