Class: Cheveret::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/cheveret/column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = nil) ⇒ Column

Returns a new instance of Column.



29
30
31
32
# File 'lib/cheveret/column.rb', line 29

def initialize(name, options=nil)
  @name = name
  config(options) unless options.nil?
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



26
27
28
# File 'lib/cheveret/column.rb', line 26

def name
  @name
end

#td_htmlObject

Returns the value of attribute td_html.



27
28
29
# File 'lib/cheveret/column.rb', line 27

def td_html
  @td_html
end

#th_htmlObject

Returns the value of attribute th_html.



27
28
29
# File 'lib/cheveret/column.rb', line 27

def th_html
  @th_html
end

#weightObject

Returns the value of attribute weight.



26
27
28
# File 'lib/cheveret/column.rb', line 26

def weight
  @weight
end

Instance Method Details

#config(options) ⇒ Object



37
38
39
# File 'lib/cheveret/column.rb', line 37

def config(options)
  options.each { |k, v| send(:"#{k}=", v) if respond_to?(:"#{k}=") }
end