Class: Outpost::List::Column
- Inherits:
-
Object
- Object
- Outpost::List::Column
- Defined in:
- lib/outpost/list/column.rb
Instance Attribute Summary collapse
-
#_display_helper ⇒ Object
Returns the value of attribute _display_helper.
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#default_order_direction ⇒ Object
Returns the value of attribute default_order_direction.
-
#display ⇒ Object
Returns the value of attribute display.
-
#header ⇒ Object
Returns the value of attribute header.
-
#list ⇒ Object
Returns the value of attribute list.
-
#position ⇒ Object
Returns the value of attribute position.
-
#quick_edit ⇒ Object
(also: #quick_edit?)
Returns the value of attribute quick_edit.
-
#sortable ⇒ Object
(also: #sortable?)
Returns the value of attribute sortable.
Instance Method Summary collapse
-
#initialize(attribute, list, attributes = {}) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(attribute, list, attributes = {}) ⇒ Column
Returns a new instance of Column.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/outpost/list/column.rb', line 18 def initialize(attribute, list, attributes={}) @attribute = attribute.to_s @list = list @position = @list.columns.size @header = attributes[:header] || @attribute.titleize @display = attributes[:display] @quick_edit = !!attributes[:quick_edit] @sortable = !!attributes[:sortable] @default_order_direction = attributes[:default_order_direction] || List::DEFAULT_ORDER_DIRECTION end |
Instance Attribute Details
#_display_helper ⇒ Object
Returns the value of attribute _display_helper.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def _display_helper @_display_helper end |
#attribute ⇒ Object
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def attribute @attribute end |
#default_order_direction ⇒ Object
Returns the value of attribute default_order_direction.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def default_order_direction @default_order_direction end |
#display ⇒ Object
Returns the value of attribute display.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def display @display end |
#header ⇒ Object
Returns the value of attribute header.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def header @header end |
#list ⇒ Object
Returns the value of attribute list.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def list @list end |
#position ⇒ Object
Returns the value of attribute position.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def position @position end |
#quick_edit ⇒ Object Also known as: quick_edit?
Returns the value of attribute quick_edit.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def quick_edit @quick_edit end |
#sortable ⇒ Object Also known as: sortable?
Returns the value of attribute sortable.
4 5 6 |
# File 'lib/outpost/list/column.rb', line 4 def sortable @sortable end |