Class: BEL::Nanopub::MapReferencesCombiner

Inherits:
BufferingNanopubCombiner show all
Defined in:
lib/bel/nanopub/map_references_combiner.rb

Instance Method Summary collapse

Constructor Details

#initialize(nanopub_collection, map_references) ⇒ MapReferencesCombiner

Returns a new instance of MapReferencesCombiner.



6
7
8
9
# File 'lib/bel/nanopub/map_references_combiner.rb', line 6

def initialize(nanopub_collection, map_references)
  @nanopub_collection = nanopub_collection
  @map_references     = map_references
end

Instance Method Details

#annotation_referencesObject



11
12
13
# File 'lib/bel/nanopub/map_references_combiner.rb', line 11

def annotation_references
  @map_references.annotation_references
end

#eachObject



19
20
21
22
23
24
25
26
27
# File 'lib/bel/nanopub/map_references_combiner.rb', line 19

def each
  if block_given?
    @nanopub_collection.each do |nanopub|
      yield rewrite_nanopub!(nanopub, @map_references)
    end
  else
    to_enum(:each)
  end
end

#namespace_referencesObject



15
16
17
# File 'lib/bel/nanopub/map_references_combiner.rb', line 15

def namespace_references
  @map_references.namespace_references
end