Class: LWS::Resource::Folder

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

Overview

The folder class

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 folder.

Returns:



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

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

#account_idInteger

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

Returns:

  • (Integer)

    the ID of the account of the user that created the folder



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

attribute :account_id

#collection_idsArray<Integer>

Returns the IDs of the collections filed in the folder.

Returns:

  • (Array<Integer>)

    the IDs of the collections filed in the folder



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

attribute :collection_ids

#collectionsArray<Collection>

Returns the collections filed in the folder.

Returns:

  • (Array<Collection>)

    the collections filed in the folder



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

has_many :collections

#companyLWS::Auth::Company

Returns the company the folder belongs to.

Returns:



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

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

#company_idInteger

Returns the ID of the company the folder belongs to.

Returns:

  • (Integer)

    the ID of the company the folder belongs to



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

attribute :company_id

#deleted_atString?

Returns the timestamp of when the folder was deleted.

Returns:

  • (String, nil)

    the timestamp of when the folder was deleted



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

attribute :deleted_at

#descriptionString

Returns the description of the folder.

Returns:

  • (String)

    the description of the folder



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

attribute :description

#emailString (readonly)

Returns the email adress of the folder.

Returns:

  • (String)

    the email adress of the folder



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

attribute :email

#favouriteBoolean

Returns flag whether the folder is considered as a favourite.

Returns:

  • (Boolean)

    flag whether the folder is considered as a favourite



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

attribute :favourite

#folder_idsArray<Integer>

Returns the IDs of the (child) folders contained in the folder.

Returns:

  • (Array<Integer>)

    the IDs of the (child) folders contained in the folder



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

attribute :folder_ids

#foldersArray<Folder>

Returns the (child) folders contained in the folder.

Returns:

  • (Array<Folder>)

    the (child) folders contained in the folder



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

has_many :folders

#nameString

Returns the name of the folder.

Returns:

  • (String)

    the name of the folder



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

attribute :name

#parentFolder?

Returns the parent folder of the folder.

Returns:

  • (Folder, nil)

    the parent folder of the folder



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

belongs_to :parent, class_name: "LWS::Resource::Folder",
foreign_key: "parent_id"

#parent_idInteger?

Returns the ID of the parent folder of the folder.

Returns:

  • (Integer, nil)

    the ID of the parent folder of the folder



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

attribute :parent_id

#permission"700", ...

A UNIX-style permission that indicates whether the folder is shared and who can read/write in it:

  • 700: not shared (the default), only readable/writable by the associated account

  • 740: readable by anyone in the company

  • 770: readable/writeable by anyone in the company

Returns:

  • ("700", "740", "770")

    the (share) permission of the folder



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

attribute :permission

#temporaryBoolean

Returns whether the folder is temporary and thus will be deleted after some time.

Returns:

  • (Boolean)

    whether the folder is temporary and thus will be deleted after some time



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

attribute :temporary