class Datagrid::Columns::Column::ResponseFormat
Datagrid
class holding an information of how a column should be rendered in data/console/csv format and HTML format
Attributes
data_block[RW]
html_block[RW]
Public Class Methods
new() { |self| ... }
click to toggle source
# File lib/datagrid/columns/column.rb, line 9 def initialize yield(self) end
Public Instance Methods
call_data()
click to toggle source
# File lib/datagrid/columns/column.rb, line 21 def call_data data_block.call end
call_html(context)
click to toggle source
# File lib/datagrid/columns/column.rb, line 29 def call_html(context) context.instance_eval(&html_block) end
data(&block)
click to toggle source
# File lib/datagrid/columns/column.rb, line 13 def data(&block) self.data_block = block end
html(&block)
click to toggle source
# File lib/datagrid/columns/column.rb, line 17 def html(&block) self.html_block = block end
to_s()
click to toggle source
# File lib/datagrid/columns/column.rb, line 25 def to_s call_data.to_s end