Sha256: 83a9c0af22736bc8d0262e2984ff1651d58c8c19a05aba90e78c97374284ee78

Contents?: true

Size: 463 Bytes

Versions: 9

Compression:

Stored size: 463 Bytes

Contents

module Effective
  class DatatableColumn
    attr_accessor :attributes

    delegate :[], :[]=, to: :attributes

    def initialize(attributes)
      @attributes = attributes
    end

    def to_s
      self[:name]
    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

9 entries across 9 versions & 1 rubygems

Version Path
effective_datatables-3.0.8 app/models/effective/datatable_column.rb
effective_datatables-3.0.7 app/models/effective/datatable_column.rb
effective_datatables-3.0.6 app/models/effective/datatable_column.rb
effective_datatables-3.0.5 app/models/effective/datatable_column.rb
effective_datatables-3.0.4 app/models/effective/datatable_column.rb
effective_datatables-3.0.3 app/models/effective/datatable_column.rb
effective_datatables-3.0.2 app/models/effective/datatable_column.rb
effective_datatables-3.0.1 app/models/effective/datatable_column.rb
effective_datatables-3.0.0 app/models/effective/datatable_column.rb