class GoodData::LCM2::SynchronizeAttributeDrillpath
Constants
- DESCRIPTION
- PARAMS
- RESULT_HEADER
Public Class Methods
call(params)
click to toggle source
# File lib/gooddata/lcm/actions/synchronize_attribute_drillpaths.rb, line 35 def call(params) results = [] client = params.gdc_gd_client development_client = params.development_client params.synchronize.peach do |info| from = info.from to = info.to from_project = development_client.projects(from) || fail("Invalid 'from' project specified - '#{from}'") to_projects = to.pmap do |entry| pid = entry[:pid] client.projects(pid) || fail("Invalid 'to' project specified - '#{pid}'") end GoodData::LCM.transfer_attribute_drillpaths(from_project, to_projects) to_projects.each do |project| results << { from: from, to: project.pid, status: 'ok' } end end results end