Class: FabulatorLibrary

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/fabulator_library.rb

Instance Method Summary collapse

Instance Method Details

#compile_xmlObject



12
13
14
15
16
17
18
19
20
21
22
# File 'app/models/fabulator_library.rb', line 12

def compile_xml
  lib = Fabulator::Lib::Lib.new
  begin
    lib.compile_xml(self.xml)
    lib.register_library
  rescue => e
    # add error
    Rails.logger.info("Error compiling library: #{e}")
  end
  self.compiled_xml = lib
end