Class: Listings::ColumnDescriptor
- Inherits:
-
BaseFieldDescriptor
- Object
- BaseFieldDescriptor
- Listings::ColumnDescriptor
- Defined in:
- lib/listings/column_descriptor.rb
Instance Attribute Summary
Attributes inherited from BaseFieldDescriptor
Instance Method Summary collapse
-
#initialize(path, props, proc) ⇒ ColumnDescriptor
constructor
A new instance of ColumnDescriptor.
- #searchable? ⇒ Boolean
- #sortable? ⇒ Boolean
Methods inherited from BaseFieldDescriptor
Constructor Details
#initialize(path, props, proc) ⇒ ColumnDescriptor
Returns a new instance of ColumnDescriptor.
3 4 5 6 |
# File 'lib/listings/column_descriptor.rb', line 3 def initialize(path, props, proc) props = props.reverse_merge! searchable: false, sortable: true super(path, props, proc) end |
Instance Method Details
#searchable? ⇒ Boolean
8 9 10 |
# File 'lib/listings/column_descriptor.rb', line 8 def searchable? @props[:searchable] && is_field? end |
#sortable? ⇒ Boolean
12 13 14 |
# File 'lib/listings/column_descriptor.rb', line 12 def sortable? @props[:sortable] && is_field? end |