Sha256: fe298e9a810157e54e08de6422915efd061c2fe09ee7ee941421bb3c0ec5f154

Contents?: true

Size: 302 Bytes

Versions: 8

Compression:

Stored size: 302 Bytes

Contents

# frozen_string_literal: true

module Dhis2
  module Api
    module Shared
      module OrganisationUnit
        def parent_id
          parent ? parent["id"] : nil
        end

        def children_ids
          children ? children.map { |elt| elt["id"] } : []
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dhis2-3.3.1 lib/dhis2/api/shared/organisation_unit.rb
dhis2-3.2.1 lib/dhis2/api/shared/organisation_unit.rb
dhis2-3.0.7 lib/dhis2/api/shared/organisation_unit.rb
dhis2-3.0.5 lib/dhis2/api/shared/organisation_unit.rb
dhis2-3.0.4 lib/dhis2/api/shared/organisation_unit.rb
dhis2-3.0.3 lib/dhis2/api/shared/organisation_unit.rb
dhis2-3.0.2 lib/dhis2/api/shared/organisation_unit.rb
dhis2-3.0.0 lib/dhis2/api/shared/organisation_unit.rb