Class: Glossarist::Agent::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/glossarist/agent/collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCollection

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

#collectionObject (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