Sha256: d2b36e68172f81df16890aff4aeffe7549737d4e47549c3e7268401be501951e
Contents?: true
Size: 654 Bytes
Versions: 104
Compression:
Stored size: 654 Bytes
Contents
# In practice this is just a regular hash with the aggregate, format, search, sort do syntax that saves a block module Effective class DatatableColumn attr_accessor :attributes delegate :[], :[]=, to: :attributes def initialize(attributes) @attributes = attributes end def to_s self[:name] end def aggregate(&block) @attributes[:aggregate] = block; self end def format(&block) @attributes[:format] = block; self end def search(&block) @attributes[:search_method] = block; self end def sort(&block) @attributes[:sort_method] = block; self end end end
Version data entries
104 entries across 104 versions & 1 rubygems