Sha256: 79d14028d3606d41ed373a51cb55c3c59d4ae978b6978e70adb44e9a85e45d40

Contents?: true

Size: 543 Bytes

Versions: 22

Compression:

Stored size: 543 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',
      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

22 entries across 22 versions & 1 rubygems

Version Path
meducation_sdk-1.6.15 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.14 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.13 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.12 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.11 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.10 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.6 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.5 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.4 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.3 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.2 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.1 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.6.0 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.5.7 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.5.6 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.5.5 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.5.4 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.5.3 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.5.2 lib/meducation_sdk/resources/collection.rb
meducation_sdk-1.5.1 lib/meducation_sdk/resources/collection.rb