Sha256: 447ba4d0fb7f832b6ba5795e23835e8e9b24387a490c25b6aa72c2befc5b31db

Contents?: true

Size: 634 Bytes

Versions: 8

Compression:

Stored size: 634 Bytes

Contents

module MeducationSDK

  class CollectionTopic < 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

8 entries across 8 versions & 1 rubygems

Version Path
meducation_sdk-1.5.6 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.5.5 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.5.4 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.5.3 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.5.2 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.5.1 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.5.0 lib/meducation_sdk/resources/collection_topic.rb
meducation_sdk-1.4.4 lib/meducation_sdk/resources/collection_topic.rb