Class: Datagrid::Columns::DataRow
- Inherits:
- BasicObject
- Defined in:
- lib/datagrid/columns.rb
Overview
Object representing a single row of data when building a datagrid table
Instance Method Summary collapse
-
#initialize(grid, model) ⇒ DataRow
constructor
A new instance of DataRow.
- #method_missing(meth, *_args) ⇒ Object
- #respond_to_missing?(meth, include_private = false) ⇒ Boolean
Constructor Details
#initialize(grid, model) ⇒ DataRow
Returns a new instance of DataRow.
727 728 729 730 |
# File 'lib/datagrid/columns.rb', line 727 def initialize(grid, model) @grid = grid @model = model end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *_args) ⇒ Object
732 733 734 |
# File 'lib/datagrid/columns.rb', line 732 def method_missing(meth, *_args) @grid.data_value(meth, @model) end |
Instance Method Details
#respond_to_missing?(meth, include_private = false) ⇒ Boolean
736 737 738 |
# File 'lib/datagrid/columns.rb', line 736 def respond_to_missing?(meth, include_private = false) !!@grid.column_by_name(meth) || super end |