Class: Glossarist::ConceptSet
- Inherits:
-
Object
- Object
- Glossarist::ConceptSet
- Defined in:
- lib/glossarist/concept_set.rb
Instance Attribute Summary collapse
-
#assets ⇒ Object
an ‘Collections::Asset` object.
-
#bibliographies ⇒ Object
a ‘BibliographyCollection` object.
-
#concepts ⇒ Object
a ‘Glossarist::ManagedConceptCollection` object.
Instance Method Summary collapse
-
#initialize(concepts, assets, options = {}) ⇒ ConceptSet
constructor
A new instance of ConceptSet.
- #to_latex(filename = nil) ⇒ Object
Constructor Details
#initialize(concepts, assets, options = {}) ⇒ ConceptSet
Returns a new instance of ConceptSet.
20 21 22 23 24 25 26 27 28 |
# File 'lib/glossarist/concept_set.rb', line 20 def initialize(concepts, assets, = {}) @concepts = read_concepts(concepts) @assets = Glossarist::Collections::AssetCollection.new(assets) @bibliographies = Glossarist::Collections::BibliographyCollection.new( @concepts, .dig(:bibliography, :global_cache), .dig(:bibliography, :local_cache), ) end |
Instance Attribute Details
#assets ⇒ Object
an ‘Collections::Asset` object
14 15 16 |
# File 'lib/glossarist/concept_set.rb', line 14 def assets @assets end |
#bibliographies ⇒ Object
a ‘BibliographyCollection` object
11 12 13 |
# File 'lib/glossarist/concept_set.rb', line 11 def bibliographies @bibliographies end |
#concepts ⇒ Object
a ‘Glossarist::ManagedConceptCollection` object
8 9 10 |
# File 'lib/glossarist/concept_set.rb', line 8 def concepts @concepts end |
Instance Method Details
#to_latex(filename = nil) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/glossarist/concept_set.rb', line 30 def to_latex(filename = nil) return to_latex_from_file(filename) if filename @concepts.map do |concept| latex_template(concept) end.join("\n") end |