Class: BEL::Extension::Format::FormatXBEL::EvidenceYielder
- Inherits:
-
Object
- Object
- BEL::Extension::Format::FormatXBEL::EvidenceYielder
- Defined in:
- lib/bel/extensions/xbel.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(io) ⇒ EvidenceYielder
constructor
A new instance of EvidenceYielder.
Constructor Details
#initialize(io) ⇒ EvidenceYielder
Returns a new instance of EvidenceYielder.
42 43 44 |
# File 'lib/bel/extensions/xbel.rb', line 42 def initialize(io) @io = io end |
Instance Method Details
#each(&block) ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/bel/extensions/xbel.rb', line 46 def each(&block) if block_given? handler = EvidenceHandler.new(block) REXML::Document.parse_stream(@io, handler) else to_enum(:each) end end |