lib/table_cloth/column.rb in table_cloth-0.1.0 vs lib/table_cloth/column.rb in table_cloth-0.1.1

- old
+ new

@@ -5,19 +5,19 @@ def initialize(name, options={}) @name = name @options = options end - def value(object, view) + def value(object, view, table=nil) if options[:proc] && options[:proc].respond_to?(:call) view.capture(object, options, view, &options[:proc]) else object.send(name) end end def human_name - name.to_s.humanize + options[:label] || name.to_s.humanize end def available?(table) if options[:if] && options[:if].is_a?(Symbol) return !!table.send(options[:if]) \ No newline at end of file