Module: Sequel::Plugins::List::ClassMethods
- Defined in:
- lib/sequel/plugins/list.rb
Instance Attribute Summary collapse
-
#position_field ⇒ Object
The column name holding the position in the list, as a symbol.
-
#scope_proc ⇒ Object
A proc that scopes the dataset, so that there can be multiple positions in the list, but the positions are unique with the scoped dataset.
-
#top_of_list ⇒ Object
readonly
An Integer to use as the position of the top of the list.
Instance Attribute Details
#position_field ⇒ Object
The column name holding the position in the list, as a symbol.
85 86 87 |
# File 'lib/sequel/plugins/list.rb', line 85 def position_field @position_field end |
#scope_proc ⇒ Object
A proc that scopes the dataset, so that there can be multiple positions in the list, but the positions are unique with the scoped dataset. This proc should accept an instance and return a dataset representing the list.
90 91 92 |
# File 'lib/sequel/plugins/list.rb', line 90 def scope_proc @scope_proc end |
#top_of_list ⇒ Object (readonly)
An Integer to use as the position of the top of the list. Defaults to 1.
93 94 95 |
# File 'lib/sequel/plugins/list.rb', line 93 def top_of_list @top_of_list end |