Module: BEL::Translator::Plugins::BelScript

Defined in:
lib/bel/translator/plugins/bel_script.rb,
lib/bel/translator/plugins/bel_script/translator.rb,
lib/bel/translator/plugins/bel_script/writer.rb,
lib/bel/translator/plugins/bel_script/reader.rb

Overview

BELScript plugs a translator for BEL Script into bel.rb. Supports multiple BEL specifications by using the expression validator.

Defined Under Namespace

Classes: BelScriptTranslator, Reader, Writer

Constant Summary collapse

ID =
:bel_script
NAME =
'BEL Script Translator'
DESCRIPTION =
'A translator that reads/writes BEL nanopubs to BEL Script.'
MEDIA_TYPES =
%i(application/bel)
EXTENSIONS =
%i(bel)

Class Method Summary collapse

Class Method Details

.create_translator(options = {}) ⇒ Object



12
13
14
15
16
# File 'lib/bel/translator/plugins/bel_script.rb', line 12

def self.create_translator(options = {})
  require 'bel'
  require_relative 'bel_script/translator'
  BelScriptTranslator.new
end

.descriptionObject



26
27
28
# File 'lib/bel/translator/plugins/bel_script.rb', line 26

def self.description
  DESCRIPTION
end

.file_extensionsObject



34
35
36
# File 'lib/bel/translator/plugins/bel_script.rb', line 34

def self.file_extensions
  EXTENSIONS
end

.idObject



18
19
20
# File 'lib/bel/translator/plugins/bel_script.rb', line 18

def self.id
  ID
end

.media_typesObject



30
31
32
# File 'lib/bel/translator/plugins/bel_script.rb', line 30

def self.media_types
  MEDIA_TYPES
end

.nameObject



22
23
24
# File 'lib/bel/translator/plugins/bel_script.rb', line 22

def self.name
  NAME
end