Class: Dust::SortableItem
- Inherits:
-
Object
- Object
- Dust::SortableItem
- Defined in:
- app/models/dust/sortable_item.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#object_class ⇒ Object
readonly
Returns the value of attribute object_class.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
- #children=(children) ⇒ Object
-
#initialize(options = {}) ⇒ SortableItem
constructor
A new instance of SortableItem.
Constructor Details
#initialize(options = {}) ⇒ SortableItem
Returns a new instance of SortableItem.
7 8 9 10 11 12 13 |
# File 'app/models/dust/sortable_item.rb', line 7 def initialize(={}) @position = [:position] @object_class = [:class_name].constantize @id = [:id] self.children = [:children] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'app/models/dust/sortable_item.rb', line 5 def id @id end |
#object_class ⇒ Object (readonly)
Returns the value of attribute object_class.
5 6 7 |
# File 'app/models/dust/sortable_item.rb', line 5 def object_class @object_class end |
#position ⇒ Object
Returns the value of attribute position.
4 5 6 |
# File 'app/models/dust/sortable_item.rb', line 4 def position @position end |