Class: Locca::AndroidCollectionsGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/locca/android_collections_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(project, collection_builder) ⇒ AndroidCollectionsGenerator

Returns a new instance of AndroidCollectionsGenerator.



29
30
31
32
# File 'lib/locca/android_collections_generator.rb', line 29

def initialize(project, collection_builder)
    @collection_builder = collection_builder
    @project = project
end

Instance Method Details

#generateObject



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/locca/android_collections_generator.rb', line 34

def generate()
    result = Array.new()

    @project.collection_names.each do |collection_name|
        collection_path = @project.path_for_collection(collection_name, @project.base_lang)
        collection = @collection_builder.collection_at_path(collection_path)
        result.push(collection)
    end

    return result
end