Sha256: 95ea9eb82b056e7c1340c3e16d6fb2305d35496c9d58891f32c5283a44cbcd5b

Contents?: true

Size: 1.12 KB

Versions: 23

Compression:

Stored size: 1.12 KB

Contents

# encoding: utf-8
require 'virtus'

module Libis
  module Services
    module Rosetta

      class CollectionInfo
        # noinspection RubyResolve
        include Virtus.model

        class MetaData
          # noinspection RubyResolve
          include Virtus.model

          attribute :mid, String
          attribute :type, String
          attribute :sub_type, String
          attribute :content, String
        end

        attribute :id, String
        attribute :name, String
        attribute :parent_id, String
        attribute :collection_order, Integer
        attribute :description, String
        attribute :md_dc, MetaData
        attribute :md_source, Array[MetaData]
        attribute :navigate, Boolean
        attribute :publish, Boolean
        attribute :thumbnail, String
        attribute :external_id, String
        attribute :external_system, String

        def to_hash
          result = self.attributes
          result[:md_dc] = result[:md_dc].attributes if result[:md_dc]
          result[:md_source] = result[:md_source].map { |md| md.attributes }
          result
        end

      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
libis-services-1.1.0 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.13 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.12 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.11 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.10 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.7 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.6 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.5 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.2 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.1 lib/libis/services/rosetta/collection_info.rb
libis-services-1.0.0 lib/libis/services/rosetta/collection_info.rb
libis-services-0.2.1 lib/libis/services/rosetta/collection_info.rb
libis-services-0.2.0 lib/libis/services/rosetta/collection_info.rb
libis-services-0.1.18 lib/libis/services/rosetta/collection_info.rb
libis-services-0.1.17 lib/libis/services/rosetta/collection_info.rb
libis-services-0.1.16 lib/libis/services/rosetta/collection_info.rb
libis-services-0.1.15 lib/libis/services/rosetta/collection_info.rb
libis-services-0.1.14 lib/libis/services/rosetta/collection_info.rb
libis-services-0.1.13 lib/libis/services/rosetta/collection_info.rb
libis-services-0.1.12 lib/libis/services/rosetta/collection_info.rb