Class: Datagrid::Helper::HtmlRow
- Inherits:
-
Object
- Object
- Datagrid::Helper::HtmlRow
- Defined in:
- lib/datagrid/helper.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(context, grid, asset) ⇒ HtmlRow
constructor
A new instance of HtmlRow.
- #method_missing(method, *args, &blk) ⇒ Object
Constructor Details
#initialize(context, grid, asset) ⇒ HtmlRow
Returns a new instance of HtmlRow.
112 113 114 115 116 |
# File 'lib/datagrid/helper.rb', line 112 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
118 119 120 121 122 123 124 |
# File 'lib/datagrid/helper.rb', line 118 def method_missing(method, *args, &blk) if column = @grid.column_by_name(method) @context.datagrid_value(@grid, column, @asset) else super end end |