Sha256: 6f695af4d7ca78302fee82f2933c0ac760a4801cea948ad25966af7feba4004b

Contents?: true

Size: 814 Bytes

Versions: 6

Compression:

Stored size: 814 Bytes

Contents

module Ecoportal
  module API
    class V2
      class Page
        class Component
          class Law < Ecoportal::API::Common::Content::DoubleModel

            class << self
              def new_doc
                {
                  "id"         => new_uuid,
                  "weight"     => 999
                }
              end
            end

            passkey     :id
            passforced  :patch_ver, default: 1
            passthrough :title, :weight
            passthrough :content, :product
            passthrough :legislation, :category, :topic
            passdate    :updated_at, read_only: true

            def to_s
              [legislation, title, category, topic].join(" <:> ")
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ecoportal-api-v2-2.0.12 lib/ecoportal/api/v2/page/component/law.rb
ecoportal-api-v2-2.0.11 lib/ecoportal/api/v2/page/component/law.rb
ecoportal-api-v2-2.0.10 lib/ecoportal/api/v2/page/component/law.rb
ecoportal-api-v2-2.0.9 lib/ecoportal/api/v2/page/component/law.rb
ecoportal-api-v2-2.0.8 lib/ecoportal/api/v2/page/component/law.rb
ecoportal-api-v2-2.0.7 lib/ecoportal/api/v2/page/component/law.rb