Sha256: c0be2744a75090d2ba21c28dd97a76044ca07973fb14fb51265cad1c58352036

Contents?: true

Size: 915 Bytes

Versions: 7

Compression:

Stored size: 915 Bytes

Contents

# frozen_string_literal: true

module Kinescope
  class OrderMapping
    include Kartograph::DSL

    kartograph do
      mapping Order
      root_key plural: 'order', singular: 'order', scopes: [:read]

      property :created_at, scopes: [:read]
      property :title, scopes: [:read]
    end
  end

  class PaginationMapping
    include Kartograph::DSL

    kartograph do
      mapping Pagination
      root_key plural: 'pagination', singular: 'pagination', scopes: [:read]

      property :page, scopes: [:read]
      property :per_page, scopes: [:read]
      property :total, scopes: [:read]
    end
  end

  class MetaMapping
    include Kartograph::DSL

    kartograph do
      mapping Meta
      root_key plural: 'meta', singular: 'meta', scopes: [:read]

      property :order, include: OrderMapping, scopes: [:read]
      property :pagination, include: PaginationMapping, scopes: [:read]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kinescope-rb-0.5.1 lib/kinescope/mappings/meta_mapping.rb
kinescope-rb-0.5.0 lib/kinescope/mappings/meta_mapping.rb
kinescope-rb-0.4.0 lib/kinescope/mappings/meta_mapping.rb
kinescope-rb-0.3.0 lib/kinescope/mappings/meta_mapping.rb
kinescope-rb-0.2.1 lib/kinescope/mappings/meta_mapping.rb
kinescope-rb-0.2.0 lib/kinescope/mappings/meta_mapping.rb
kinescope-rb-0.1.0 lib/kinescope/mappings/meta_mapping.rb