Class: BEL::Format::EvidenceIterable
- Inherits:
-
Object
- Object
- BEL::Format::EvidenceIterable
- Includes:
- Enumerable
- Defined in:
- lib/bel/format.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(input, format) ⇒ EvidenceIterable
constructor
A new instance of EvidenceIterable.
Constructor Details
#initialize(input, format) ⇒ EvidenceIterable
Returns a new instance of EvidenceIterable.
42 43 44 45 |
# File 'lib/bel/format.rb', line 42 def initialize(input, format) @input = input @format = format end |
Instance Method Details
#each ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/bel/format.rb', line 47 def each if block_given? @format.deserialize(@input).each do |evidence| yield evidence end else to_enum(:each) end end |