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.
7 8 9 |
# File 'app/models/effective/datatable_column.rb', line 7 def initialize(attributes) @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
3 4 5 |
# File 'app/models/effective/datatable_column.rb', line 3 def attributes @attributes end |
Instance Method Details
#aggregate(&block) ⇒ Object
15 16 17 |
# File 'app/models/effective/datatable_column.rb', line 15 def aggregate(&block) @attributes[:aggregate] = block; self end |
#format(&block) ⇒ Object
19 20 21 |
# File 'app/models/effective/datatable_column.rb', line 19 def format(&block) @attributes[:format] = block; self end |
#search(&block) ⇒ Object
23 24 25 |
# File 'app/models/effective/datatable_column.rb', line 23 def search(&block) @attributes[:search_method] = block; self end |
#sort(&block) ⇒ Object
27 28 29 |
# File 'app/models/effective/datatable_column.rb', line 27 def sort(&block) @attributes[:sort_method] = block; self end |
#to_s ⇒ Object
11 12 13 |
# File 'app/models/effective/datatable_column.rb', line 11 def to_s self[:name] end |