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
- #format_each(&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.
10 11 12 |
# File 'app/models/effective/datatable_column.rb', line 10 def initialize(attributes) @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
6 7 8 |
# File 'app/models/effective/datatable_column.rb', line 6 def attributes @attributes end |
Instance Method Details
#aggregate(&block) ⇒ Object
18 19 20 |
# File 'app/models/effective/datatable_column.rb', line 18 def aggregate(&block) @attributes[:aggregate] = block; self end |
#format(&block) ⇒ Object
22 23 24 |
# File 'app/models/effective/datatable_column.rb', line 22 def format(&block) @attributes[:format] = block; self end |
#format_each(&block) ⇒ Object
26 27 28 |
# File 'app/models/effective/datatable_column.rb', line 26 def format_each(&block) @attributes[:format_each] = block; self end |
#search(&block) ⇒ Object
30 31 32 |
# File 'app/models/effective/datatable_column.rb', line 30 def search(&block) @attributes[:search_method] = block; self end |
#sort(&block) ⇒ Object
34 35 36 |
# File 'app/models/effective/datatable_column.rb', line 34 def sort(&block) @attributes[:sort_method] = block; self end |
#to_s ⇒ Object
14 15 16 |
# File 'app/models/effective/datatable_column.rb', line 14 def to_s self[:name] end |