Sha256: f5b62af6a40323125b6a7d840b8c66fae9e1c077beffd10538780b93717bfe71

Contents?: true

Size: 386 Bytes

Versions: 13

Compression:

Stored size: 386 Bytes

Contents

module MeducationSDK
  class Contribution < Resource
    self.path = "/contributions"
    self.spi_type = "Item::Contribution"

    def item
      @item ||= sdk_class_for(item_type).find(item_id)
    end

  end

  class ContributionMock < Contribution
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      item_id: 5,
      item_type: "MediaFile"
    }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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