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

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

#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

#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

#item_idsArray<Integer>

Returns the ID of the items that are part of the collection.

Returns:

  • (Array<Integer>)

    the ID of the items that are part of the collection



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

attribute :item_ids

#itemsArray<Collection::Item>

The returned cllection item (sub)class that is determined by the kind of this collection.

Returns:



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

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

#kind"feed", ...

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

Returns:

  • ("feed", "feeds", "image", "images", "video", "videos", "weather_location")

    the name of the class/kind of the collection



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

attribute :kind

#nameString

Returns the name of the collection.

Returns:

  • (String)

    the name of the collection



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

attribute :name

#preview_urlString

Returns the URL of a preview of the collection.

Returns:

  • (String)

    the URL of a preview of the collection



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

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)



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

attribute :processing

#uuidString

Returns the UUID used for unique file name generation.

Returns:

  • (String)

    the UUID used for unique file name generation



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

attribute :uuid