Sha256: afa171c1bfa468bebd6c736fb783b26b170ac16cb32ca8af42bdeb8c22a2de2e

Contents?: true

Size: 620 Bytes

Versions: 13

Compression:

Stored size: 620 Bytes

Contents

module MeducationSDK
  class ExternalResource < Loquor::Resource
    self.path = "/external_resources"

    def created_by
      @created_by ||= User.find(created_by_id)
    end

  end

  class ExternalResourceMock < ExternalResource
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      created_by_id: 1,
      site_name: 'FooTube',
      url: 'http://footube.example.com/foo/bar',
      title: 'Foo Bar Baz',
      description: 'The Foo Bar Baz mock external resource is a great FooTube video.',
      rating: 10,
      views_in_last_30_days: 30,
      views_in_last_60_days: 60
    }

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
meducation_sdk-1.6.6 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.5 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.4 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.3 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.2 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.1 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.0 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.5.7 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.5.6 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.5.5 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.5.4 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.5.3 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.5.2 lib/meducation_sdk/resources/external_resource.rb