Class: LWS::Resource::Collection

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/resource.rb

Overview

The collection class

There are two ways to view collections. Either it is viewed as a set of items (see #items), or it is viewed as something that is associated with one or more meta collections that each have specific item objects (see for example #feed, #image, #images, etc.).

Defined Under Namespace

Classes: Config, Feed, Image, Item, Post, Video, Vimeo, WeatherLocation, YouTube

Collection Items Attribute Summary collapse

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#deep_dup, #dig, #reload, #rollback, #save

Instance Attribute Details

#accountLWS::Auth::Account

Returns the account of the user that created the collection.

Returns:



55
# File 'lib/lws/apps/resource.rb', line 55

belongs_to :account, class_name: "LWS::Auth::Account"

#account_idInteger

Returns the ID of the account of the user that created the collection.

Returns:

  • (Integer)

    the ID of the account of the user that created the collection



60
# File 'lib/lws/apps/resource.rb', line 60

attribute :account_id

#companyLWS::Auth::Company

Returns the company the collection belongs to.

Returns:



64
# File 'lib/lws/apps/resource.rb', line 64

belongs_to :company, class_name: "LWS::Auth::Company"

#company_idInteger

Returns the ID of the company the collection belongs to.

Returns:

  • (Integer)

    the ID of the company the collection belongs to



68
# File 'lib/lws/apps/resource.rb', line 68

attribute :company_id

#configCollection::Config

Returns the configuration that is part of the collection (if kind is :config).

Returns:

  • (Collection::Config)

    the configuration that is part of the collection (if kind is :config)



126
# File 'lib/lws/apps/resource.rb', line 126

has_one :config

#deleted_atString?

Returns the timestamp of when the collection was deleted.

Returns:

  • (String, nil)

    the timestamp of when the collection was deleted



72
# File 'lib/lws/apps/resource.rb', line 72

attribute :deleted_at

#descriptionString

Returns the description of the collection.

Returns:

  • (String)

    the description of the collection



76
# File 'lib/lws/apps/resource.rb', line 76

attribute :description

#emailString?

Returns the email address used for email imports.

Returns:

  • (String, nil)

    the email address used for email imports



80
# File 'lib/lws/apps/resource.rb', line 80

attribute :email

#feedCollection::Feed

Returns the feed that is part of the collection (if kind is :feed).

Returns:

  • (Collection::Feed)

    the feed that is part of the collection (if kind is :feed)



131
# File 'lib/lws/apps/resource.rb', line 131

has_one :feed

#feedsArray<Collection::Feed>

Returns the feeds that are part of the collection (if kind is :feeds).

Returns:

  • (Array<Collection::Feed>)

    the feeds that are part of the collection (if kind is :feeds)



136
# File 'lib/lws/apps/resource.rb', line 136

has_many :feeds

#folderFolder

Returns the folder that the collection is filed in.

Returns:

  • (Folder)

    the folder that the collection is filed in



84
# File 'lib/lws/apps/resource.rb', line 84

belongs_to :folder

#folder_idInteger

Returns the ID of the folder that the collection is filed in.

Returns:

  • (Integer)

    the ID of the folder that the collection is filed in



89
# File 'lib/lws/apps/resource.rb', line 89

attribute :folder_id

#imageCollection::Image

Returns the image that is part of the collection (if kind is :image).

Returns:

  • (Collection::Image)

    the image that is part of the collection (if kind is :image)



141
# File 'lib/lws/apps/resource.rb', line 141

has_one :image

#imagesArray<Collection::Image>

Returns the images that are part of the collection (if kind is :images).

Returns:

  • (Array<Collection::Image>)

    the images that are part of the collection (if kind is :images)



146
# File 'lib/lws/apps/resource.rb', line 146

has_many :images

#itemsCollection::Item

The returned object are of a class that is determined by the kind of this collection.

Returns:



96
# File 'lib/lws/apps/resource.rb', line 96

has_many :items, class_name: "LWS::Resource::Collection::Item"

#kind"feed", ...

Returns the name of the class/kind of the collection.

Returns:



101
# File 'lib/lws/apps/resource.rb', line 101

attribute :kind

#nameString

Returns the name of the collection.

Returns:

  • (String)

    the name of the collection



105
# File 'lib/lws/apps/resource.rb', line 105

attribute :name

#powerpointCollection::PowerPoint

Returns the PowerPoint presentation that is part of the collection (if kind is :powerpoint).

Returns:

  • (Collection::PowerPoint)

    the PowerPoint presentation that is part of the collection (if kind is :powerpoint)



151
# File 'lib/lws/apps/resource.rb', line 151

has_one :powerpoint

#preview_urlString

Returns the URL of a preview of the collection.

Returns:

  • (String)

    the URL of a preview of the collection



109
# File 'lib/lws/apps/resource.rb', line 109

attribute :preview_url

#processingBoolean

Returns whether the collection is being processed (i.e. it is not ready for use).

Returns:

  • (Boolean)

    whether the collection is being processed (i.e. it is not ready for use)



114
# File 'lib/lws/apps/resource.rb', line 114

attribute :processing

#uuidString

Returns the UUID used for unique file name generation.

Returns:

  • (String)

    the UUID used for unique file name generation



118
# File 'lib/lws/apps/resource.rb', line 118

attribute :uuid

#videoCollection::Video

Returns the video that is part of the collection (if kind is :video).

Returns:

  • (Collection::Video)

    the video that is part of the collection (if kind is :video)



166
# File 'lib/lws/apps/resource.rb', line 166

has_one :video

#videosArray<Collection::Video>

Returns the videos that are part of the collection (if kind is :videos).

Returns:

  • (Array<Collection::Video>)

    the videos that are part of the collection (if kind is :videos)



171
# File 'lib/lws/apps/resource.rb', line 171

has_many :videos

#vimeoCollection::Vimeo

Returns the Vimeo video that is part of the collection (if kind is :vimeo).

Returns:

  • (Collection::Vimeo)

    the Vimeo video that is part of the collection (if kind is :vimeo)



176
# File 'lib/lws/apps/resource.rb', line 176

has_one :vimeo

#vimeosArray<Collection::Vimeo>

Returns the Vimeo videos that are part of the collection (if kind is :vimeos).

Returns:

  • (Array<Collection::Vimeo>)

    the Vimeo videos that are part of the collection (if kind is :vimeos)



181
# File 'lib/lws/apps/resource.rb', line 181

has_many :vimeos

#weather_locationCollection::WeatherLocation

Returns the weather collection that is part of the collection (if kind is :weather_location).

Returns:



186
# File 'lib/lws/apps/resource.rb', line 186

has_one :weather_location

#youtubeCollection::YouTube

Returns the YouTube video that is part of the collection (if kind is :youtube).

Returns:

  • (Collection::YouTube)

    the YouTube video that is part of the collection (if kind is :youtube)



156
# File 'lib/lws/apps/resource.rb', line 156

has_one :youtube

#youtubesArray<Collection::YouTube>

Returns the YouTube videos that are part of the collection (if kind is :youtubes).

Returns:

  • (Array<Collection::YouTube>)

    the YouTube videos that are part of the collection (if kind is :youtubes)



161
# File 'lib/lws/apps/resource.rb', line 161

has_many :youtubes