Class: Datagrid::Helper::HtmlRow

Inherits:
Object
  • Object
show all
Defined in:
lib/datagrid/helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(context, grid, asset) ⇒ HtmlRow

Returns a new instance of HtmlRow.



78
79
80
81
82
# File 'lib/datagrid/helper.rb', line 78

def initialize(context, grid, asset)
  @context = context
  @grid = grid
  @asset = asset
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &blk) ⇒ Object



84
85
86
87
88
89
90
# File 'lib/datagrid/helper.rb', line 84

def method_missing(method, *args, &blk)
  if column = @grid.column_by_name(method)
    @context.datagrid_format_value(@grid, column, @asset)
  else
    super
  end
end