Class: BEL::Nanopub::StreamingNanopubCombiner
- Inherits:
-
Object
- Object
- BEL::Nanopub::StreamingNanopubCombiner
- Defined in:
- lib/bel/nanopub/streaming_nanopub_combiner.rb
Instance Attribute Summary collapse
-
#annotation_references ⇒ Object
readonly
Returns the value of attribute annotation_references.
-
#namespace_references ⇒ Object
readonly
Returns the value of attribute namespace_references.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(nanopub_collection) ⇒ StreamingNanopubCombiner
constructor
A new instance of StreamingNanopubCombiner.
Constructor Details
#initialize(nanopub_collection) ⇒ StreamingNanopubCombiner
Returns a new instance of StreamingNanopubCombiner.
8 9 10 |
# File 'lib/bel/nanopub/streaming_nanopub_combiner.rb', line 8 def initialize(nanopub_collection) @nanopub_collection = nanopub_collection end |
Instance Attribute Details
#annotation_references ⇒ Object (readonly)
Returns the value of attribute annotation_references.
6 7 8 |
# File 'lib/bel/nanopub/streaming_nanopub_combiner.rb', line 6 def annotation_references @annotation_references end |
#namespace_references ⇒ Object (readonly)
Returns the value of attribute namespace_references.
6 7 8 |
# File 'lib/bel/nanopub/streaming_nanopub_combiner.rb', line 6 def namespace_references @namespace_references end |
Instance Method Details
#each ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/bel/nanopub/streaming_nanopub_combiner.rb', line 12 def each if block_given? @nanopub_collection.each do |nanopub| once { @annotation_references = nanopub.references.annotations @namespace_references = nanopub.references.namespaces } yield nanopub end else to_enum(:each) end end |