Sha256: 2662b0b11e6913c67033c695eed75bee999b5a9a15524531c9850f1644c26dd8

Contents?: true

Size: 574 Bytes

Versions: 15

Compression:

Stored size: 574 Bytes

Contents

module MeducationSDK

  class Collection < Resource

    self.path = "/collections"

    def sections
      @sections ||= Section.where(collection_id: id)
    end

  end

  class CollectionMock < Collection
    extend Loquor::ResourceMock

    self.attributes = {
      id: 7,
      title: 'This is a mock collection',
      description: 'This is a sample description',
      slug: "mock_collection",
      market_description: 'This is a sample market description',
      section_ids: [2,3,4,5,6],
      topic_ids: [1,2,3,4],
      resource_ids: [9,8,7,6]
    }

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
meducation_sdk-2.2.2 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.2.1 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.2.0 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.1.4 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.1.3 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.1.2 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.1.1 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.1.0 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.0.5 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.0.4 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.0.3 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.0.2 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.0.1 lib/meducation_sdk/resources/collection.rb
meducation_sdk-2.0.0 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.16 lib/meducation_sdk/resources/collection.rb