Sha256: 254ea68d364f3b2f84d6797f11119cd8c731f7e4f5f22c14507974881da3344c

Contents?: true

Size: 462 Bytes

Versions: 8

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true

module Dhis2
  module Api
    module Shared
      module DataElementGroup
        def self.included(base)
          base.extend(ClassMethods)
        end

        def data_element_ids
          data_elements.map { |elt| elt["id"] }
        end

        module ClassMethods
          def creation_defaults(args)
            {
              code: args[:short_name]
            }
          end
        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/data_element_group.rb
dhis2-3.2.1 lib/dhis2/api/shared/data_element_group.rb
dhis2-3.0.7 lib/dhis2/api/shared/data_element_group.rb
dhis2-3.0.5 lib/dhis2/api/shared/data_element_group.rb
dhis2-3.0.4 lib/dhis2/api/shared/data_element_group.rb
dhis2-3.0.3 lib/dhis2/api/shared/data_element_group.rb
dhis2-3.0.2 lib/dhis2/api/shared/data_element_group.rb
dhis2-3.0.0 lib/dhis2/api/shared/data_element_group.rb