Class: BEL::Translator::Plugins::Xbel::NanopubYielder
- Inherits:
-
Object
- Object
- BEL::Translator::Plugins::Xbel::NanopubYielder
- Defined in:
- lib/bel/translator/plugins/xbel/nanopub_yielder.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(io, options = {}) ⇒ NanopubYielder
constructor
A new instance of NanopubYielder.
Constructor Details
#initialize(io, options = {}) ⇒ NanopubYielder
Returns a new instance of NanopubYielder.
10 11 12 |
# File 'lib/bel/translator/plugins/xbel/nanopub_yielder.rb', line 10 def initialize(io, = {}) @io = io end |
Instance Method Details
#each(&block) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/bel/translator/plugins/xbel/nanopub_yielder.rb', line 14 def each(&block) if block_given? handler = NanopubHandler.new(block) REXML::Document.parse_stream(@io, handler) else to_enum(:each) end end |