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

#dig, #reload, #rollback, #save

Instance Attribute Details

#accountLWS::Auth::Account

Returns the account of the user that created the folder.

Returns:



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

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



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

attribute :account_id

#collectionsArray<Collection>

Returns the collections filed in the folder.

Returns:

  • (Array<Collection>)

    the collections filed in the folder



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

has_many :collections

#companyLWS::Auth::Company

Returns the company the folder belongs to.

Returns:



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

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



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

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



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

attribute :deleted_at

#descriptionString

Returns the description of the folder.

Returns:

  • (String)

    the description of the folder



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

attribute :description

#favouriteBoolean

Returns flag whether the folder is considered as a favourite.

Returns:

  • (Boolean)

    flag whether the folder is considered as a favourite



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

attribute :favourite

#foldersArray<Folder>

Returns the folders contained in the folder.

Returns:

  • (Array<Folder>)

    the folders contained in the folder



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

has_many :folders

#nameString

Returns the name of the folder.

Returns:

  • (String)

    the name of the folder



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

attribute :name

#parentFolder?

Returns the parent folder of the folder.

Returns:

  • (Folder, nil)

    the parent folder of the folder



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

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



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

attribute :parent_id