Class: Effective::DatatableColumn
- Inherits:
-
Object
- Object
- Effective::DatatableColumn
- Defined in:
- app/models/effective/datatable_column.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Instance Method Summary collapse
- #aggregate(&block) ⇒ Object
- #format(&block) ⇒ Object
-
#initialize(attributes) ⇒ DatatableColumn
constructor
A new instance of DatatableColumn.
- #search(&block) ⇒ Object
- #sort(&block) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(attributes) ⇒ DatatableColumn
Returns a new instance of DatatableColumn.
8 9 10 |
# File 'app/models/effective/datatable_column.rb', line 8 def initialize(attributes) @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'app/models/effective/datatable_column.rb', line 4 def attributes @attributes end |
Instance Method Details
#aggregate(&block) ⇒ Object
16 17 18 |
# File 'app/models/effective/datatable_column.rb', line 16 def aggregate(&block) @attributes[:aggregate] = block; self end |
#format(&block) ⇒ Object
20 21 22 |
# File 'app/models/effective/datatable_column.rb', line 20 def format(&block) @attributes[:format] = block; self end |
#search(&block) ⇒ Object
24 25 26 |
# File 'app/models/effective/datatable_column.rb', line 24 def search(&block) @attributes[:search_method] = block; self end |
#sort(&block) ⇒ Object
28 29 30 |
# File 'app/models/effective/datatable_column.rb', line 28 def sort(&block) @attributes[:sort_method] = block; self end |
#to_s ⇒ Object
12 13 14 |
# File 'app/models/effective/datatable_column.rb', line 12 def to_s self[:name] end |