Class: SaxonProcessorFactory

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.processorObject



216
217
218
# File 'lib/xspec.rb', line 216

def self.processor
  new.processor
end

Instance Method Details

#processorObject



230
231
232
# File 'lib/xspec.rb', line 230

def processor
  Saxon::Processor.create(saxon_conf)
end

#saxon_confObject



220
221
222
223
224
225
226
227
228
# File 'lib/xspec.rb', line 220

def saxon_conf
  license_file_path = Pathname.pwd.join('saxon-license.lic')
  if license_file_path.file?
    Saxon::Loader.load!(ENV['SAXON_HOME'] || '/opt/saxon')
    Saxon::Configuration.create_licensed(license_file_path.to_s)
  else
    nil
  end
end