Sha256: 6c276aec6ea57c079962d87b1537e9f3feea4d7463e4fc30b7a2359edd6145da

Contents?: true

Size: 642 Bytes

Versions: 11

Compression:

Stored size: 642 Bytes

Contents

module MeducationSDK

  class CollectionTopic < Loquor::Resource

    self.path = "/collection_topics"

    def user
      @user ||= User.find(user_id)
    end

    def comments
      @comments ||= Comment.where(id: comment_ids)
    end

  end

  class CollectionTopicMock < CollectionTopic
    extend Loquor::ResourceMock

    self.attributes = {
      id: 728463,
      title: 'This is a mock collection topic',
      description: 'This is a sample description',
      collection_id: 1,
      section_id: 17,
      resource_ids: [3, 4, 5],
      views_in_last_30_days: 1,
      views_in_last_60_days: 2,
      rating: 123
    }

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
meducation_sdk-1.4.3 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.4.2 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.4.1 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.4.0 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.3.0 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.2.6 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.2.5 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.2.4 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.2.3 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.2.2 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.2.1 lib/meducation_sdk/resources/collection_topic.rb