Module: BEL::Translator
- Included in:
- BELRDF::Translator, Plugins::Bnj::BnjTranslator, Plugins::Jgf::JgfTranslator, Plugins::Xbel::XbelTranslator, BELRDF::GraphTranslator, BELRDF::Translator
- Defined in:
- lib/bel/translator.rb
Overview
The Translator module defines a plugin that reads a specific document format into BEL nanopubs and writes BEL nanopubs back to this document format.
-
Read
-
#read: read the input format and parse to Nanopub::Nanopub objects
-
-
Write
-
#write: write Nanopub::Nanopub objects to the output format
-
Defined Under Namespace
Modules: Plugins
Instance Method Summary collapse
-
#read(data, options = {}) ⇒ #each
Read BEL nanopubs from this translator’s supported file format.
-
#write(data, writer = StringIO.new, options = {}) ⇒ IO
Writes BEL nanopubs to the provided IO
writer
.
Instance Method Details
#read(data, options = {}) ⇒ #each
Read BEL nanopubs from this translator’s supported file format.
89 90 91 |
# File 'lib/bel/translator.rb', line 89 def read(data, = {}) raise NotImplementedError.new("#{__method__} is not implemented.") end |
#write(data, writer = StringIO.new, options = {}) ⇒ IO
Writes BEL nanopubs to the provided IO writer
.
100 101 102 |
# File 'lib/bel/translator.rb', line 100 def write(data, writer = StringIO.new, = {}) raise NotImplementedError.new("#{__method__} is not implemented.") end |