Class: Glossarist::Agent::Collection
- Inherits:
-
Object
- Object
- Glossarist::Agent::Collection
- Defined in:
- lib/glossarist/agent/collection.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Instance Method Summary collapse
- #add_concept(data) ⇒ Object
-
#initialize ⇒ Collection
constructor
A new instance of Collection.
- #save_to_files(output_path) ⇒ Object
Constructor Details
#initialize ⇒ Collection
Returns a new instance of Collection.
8 9 10 |
# File 'lib/glossarist/agent/collection.rb', line 8 def initialize @collection = Glossarist::ManagedConceptCollection.new end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
6 7 8 |
# File 'lib/glossarist/agent/collection.rb', line 6 def collection @collection end |
Instance Method Details
#add_concept(data) ⇒ Object
12 13 14 15 |
# File 'lib/glossarist/agent/collection.rb', line 12 def add_concept(data) concept = Concept.new(data) @collection << concept.managed_concept end |
#save_to_files(output_path) ⇒ Object
17 18 19 |
# File 'lib/glossarist/agent/collection.rb', line 17 def save_to_files(output_path) @collection.save_to_files(output_path) end |