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:



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

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



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

attribute :account_id

#collectionsArray<Collection>

Returns the collections filed in the folder.

Returns:

  • (Array<Collection>)

    the collections filed in the folder



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

has_many :collections

#companyLWS::Auth::Company

Returns the company the folder belongs to.

Returns:



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

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



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

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



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

attribute :deleted_at

#descriptionString

Returns the description of the folder.

Returns:

  • (String)

    the description of the folder



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

attribute :description

#emailString (readonly)

Returns the email adress of the folder.

Returns:

  • (String)

    the email adress of the folder



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

#favouriteBoolean

Returns flag whether the folder is considered as a favourite.

Returns:

  • (Boolean)

    flag whether the folder is considered as a favourite



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

attribute :favourite

#foldersArray<Folder>

Returns the folders contained in the folder.

Returns:

  • (Array<Folder>)

    the folders contained in the folder



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

has_many :folders

#nameString

Returns the name of the folder.

Returns:

  • (String)

    the name of the folder



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

attribute :name

#parentFolder?

Returns the parent folder of the folder.

Returns:

  • (Folder, nil)

    the parent folder of the folder



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

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



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

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



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

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



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

attribute :temporary