Class: Celsius::Primo::SoapApi::Searcher::SearchBrief::SearchRequestTransformation::SetLanguages

Inherits:
Transformation::Step
  • Object
show all
Defined in:
lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/set_languages.rb

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
# File 'lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/set_languages.rb', line 7

def call
  (transformation.languages || []).each do |language|
    transformation.inner_search_request.locate("PrimoSearchRequest/Languages").first.tap do |node|
      node << Ox.parse("<Language>#{language}</Language>")
    end
  end
end