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.
18 19 20 21 22 23 24 25 26 |
# File 'lib/glossarist/concept_set.rb', line 18 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
12 13 14 |
# File 'lib/glossarist/concept_set.rb', line 12 def assets @assets end |
#bibliographies ⇒ Object
a ‘BibliographyCollection` object
9 10 11 |
# File 'lib/glossarist/concept_set.rb', line 9 def bibliographies @bibliographies end |
#concepts ⇒ Object
a ‘Glossarist::ManagedConceptCollection` object
6 7 8 |
# File 'lib/glossarist/concept_set.rb', line 6 def concepts @concepts end |
Instance Method Details
#to_latex(filename = nil) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/glossarist/concept_set.rb', line 28 def to_latex(filename = nil) return to_latex_from_file(filename) if filename @concepts.map do |concept| latex_template(concept) end.join("\n") end |