Class: BEL::Nanopub::HashMapReferences
- Inherits:
-
Object
- Object
- BEL::Nanopub::HashMapReferences
- Includes:
- MapReferences
- Defined in:
- lib/bel/nanopub/hash_map_references.rb
Instance Method Summary collapse
- #annotation_references ⇒ Object
-
#initialize(annotation_reference_map, namespace_reference_map) ⇒ HashMapReferences
constructor
A new instance of HashMapReferences.
- #map_annotation_reference(reference) ⇒ Object
- #map_namespace_reference(reference) ⇒ Object
- #namespace_references ⇒ Object
Constructor Details
#initialize(annotation_reference_map, namespace_reference_map) ⇒ HashMapReferences
Returns a new instance of HashMapReferences.
8 9 10 11 12 13 14 |
# File 'lib/bel/nanopub/hash_map_references.rb', line 8 def initialize(annotation_reference_map, namespace_reference_map) @annotation_reference_map = annotation_reference_map @namespace_reference_map = namespace_reference_map @annotation_references = annotation_reference_map.values.uniq @namespace_references = namespace_reference_map.values.uniq end |
Instance Method Details
#annotation_references ⇒ Object
16 17 18 |
# File 'lib/bel/nanopub/hash_map_references.rb', line 16 def annotation_references @annotation_references end |
#map_annotation_reference(reference) ⇒ Object
24 25 26 |
# File 'lib/bel/nanopub/hash_map_references.rb', line 24 def map_annotation_reference(reference) @annotation_reference_map[reference] end |
#map_namespace_reference(reference) ⇒ Object
28 29 30 |
# File 'lib/bel/nanopub/hash_map_references.rb', line 28 def map_namespace_reference(reference) @namespace_reference_map[reference] end |
#namespace_references ⇒ Object
20 21 22 |
# File 'lib/bel/nanopub/hash_map_references.rb', line 20 def namespace_references @namespace_references end |