class ActiveList::Definition::AbstractColumn

Attributes

condition[R]
id[R]
name[R]
options[R]
sort_id[R]
table[R]

Public Class Methods

new(table, name, options = {}) click to toggle source
# File lib/active_list/definition/abstract_column.rb, line 6
def initialize(table, name, options = {})
  @table   = table
  @name    = name.to_sym
  @options = options
  @hidden  = !!@options.delete(:hidden)
  @condition = @options.delete(:condition)
  @id = 'c' + @table.new_column_id # ActiveList.new_uid
end

Public Instance Methods

check_options!(options, *keys) click to toggle source
# File lib/active_list/definition/abstract_column.rb, line 47
def check_options!(options, *keys)
  for key in options.keys
    raise ArgumentError, "Key :#{key} is unexpected. (Expecting: #{keys.to_sentence})"
  end
end
computable?() click to toggle source
# File lib/active_list/definition/abstract_column.rb, line 31
def computable?
  false
end
exportable?() click to toggle source
# File lib/active_list/definition/abstract_column.rb, line 27
def exportable?
  false
end
header_code() click to toggle source
# File lib/active_list/definition/abstract_column.rb, line 15
def header_code
  raise NotImplementedError, "#{self.class.name}#header_code is not implemented."
end
hidden?() click to toggle source
# File lib/active_list/definition/abstract_column.rb, line 19
def hidden?
  @hidden
end
short_id() click to toggle source

Uncommon but simple identifier for CSS class uses

# File lib/active_list/definition/abstract_column.rb, line 41
def short_id
  @id
end
sortable?() click to toggle source
# File lib/active_list/definition/abstract_column.rb, line 23
def sortable?
  false
end
unique_id() click to toggle source

Unique identifier of the column in the application

# File lib/active_list/definition/abstract_column.rb, line 36
def unique_id
  "#{@table.name}-#{@name}"
end