Class: LWS::Resource::Collection::Item

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

Overview

The collection item 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

#collectionCollection

Returns the collection that the collection item is a part of.

Returns:

  • (Collection)

    the collection that the collection item is a part of



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

belongs_to :collection

#collection_idInteger

Returns the ID of the collection that the collection item is a part of.

Returns:

  • (Integer)

    the ID of the collection that the collection item is a part of



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

attribute :collection_id

#metadataHash

Returns the metadata of the collection item.

Returns:

  • (Hash)

    the metadata of the collection item



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

attribute :metadata

#nameString

Returns the name of the collection item.

Returns:

  • (String)

    the name of the collection item



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

attribute :name

#positionInteger

Returns the position of the item within the collection.

Returns:

  • (Integer)

    the position of the item within the collection



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

attribute :position