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



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

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



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

attribute :collection_id

#metadataHash

Returns the metadata of the collection item.

Returns:

  • (Hash)

    the metadata of the collection item



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

attribute :metadata

#nameString

Returns the name of the collection item.

Returns:

  • (String)

    the name of the collection item



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

attribute :name

#positionInteger

Returns the position of the item within the collection.

Returns:

  • (Integer)

    the position of the item within the collection



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

attribute :position