Class: SaxonProcessorFactory

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.processorObject



187
188
189
# File 'lib/xspec.rb', line 187

def self.processor
  new.processor
end

Instance Method Details

#processorObject



201
202
203
# File 'lib/xspec.rb', line 201

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

#saxon_confObject



191
192
193
194
195
196
197
198
199
# File 'lib/xspec.rb', line 191

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