Class: Nuva::Queries::AllNomenclatures

Inherits:
Object
  • Object
show all
Defined in:
lib/nuva/queries.rb

Instance Method Summary collapse

Constructor Details

#initialize(repositories) ⇒ AllNomenclatures

Returns a new instance of AllNomenclatures.



189
190
191
# File 'lib/nuva/queries.rb', line 189

def initialize(repositories)
  @vaccines = repositories.vaccines
end

Instance Method Details

#callObject



193
194
195
196
197
# File 'lib/nuva/queries.rb', line 193

def call
  (@vaccines.all.flat_map do |v|
    v.codes.map(&:nomenclature)
  end).uniq
end