class BEL::Translator::Plugins::BelScript::BelScriptTranslator
BelScriptTranslator
defines a {BEL::Translator} that can read/write BEL
Script using the Nanopub model.
Public Instance Methods
read(data, options = {})
click to toggle source
# File lib/bel/translator/plugins/bel_script/translator.rb, line 14 def read(data, options = {}) Reader.new(data, options) end
write(objects, writer = StringIO.new, options = {}) { |bel_part| ... }
click to toggle source
# File lib/bel/translator/plugins/bel_script/translator.rb, line 18 def write(objects, writer = StringIO.new, options = {}) if block_given? Writer.new(objects, options).each { |bel_part| yield bel_part } else if writer Writer.new(objects, options).each { |bel_part| writer << "#{bel_part}" writer.flush } writer else Writer.new(objects, options) end end end