Class: Effective::DatatableDslTool
- Inherits:
-
Object
- Object
- Effective::DatatableDslTool
- Includes:
- EffectiveDatatable::Dsl::BulkActions, EffectiveDatatable::Dsl::Charts, EffectiveDatatable::Dsl::Datatable, EffectiveDatatable::Dsl::Filters
- Defined in:
- app/models/effective/datatable_dsl_tool.rb
Instance Attribute Summary collapse
-
#datatable ⇒ Object
readonly
Returns the value of attribute datatable.
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
-
#initialize(datatable) ⇒ DatatableDslTool
constructor
A new instance of DatatableDslTool.
- #method_missing(method, *args) ⇒ Object
Methods included from EffectiveDatatable::Dsl::Filters
#changes_columns_count, #filter, #form, #scope
Methods included from EffectiveDatatable::Dsl::Datatable
#actions_col, #aggregate, #bulk_actions_col, #col, #length, #order, #val
Methods included from EffectiveDatatable::Dsl::Charts
Methods included from EffectiveDatatable::Dsl::BulkActions
#bulk_action, #bulk_action_content, #bulk_action_divider, #bulk_download
Constructor Details
#initialize(datatable) ⇒ DatatableDslTool
Returns a new instance of DatatableDslTool.
12 13 14 15 |
# File 'app/models/effective/datatable_dsl_tool.rb', line 12 def initialize(datatable) @datatable = datatable @view = datatable.view end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'app/models/effective/datatable_dsl_tool.rb', line 17 def method_missing(method, *args) if datatable.respond_to?(method) datatable.send(method, *args) elsif view.respond_to?(method) view.send(method, *args) else super end end |
Instance Attribute Details
#datatable ⇒ Object (readonly)
Returns the value of attribute datatable.
4 5 6 |
# File 'app/models/effective/datatable_dsl_tool.rb', line 4 def datatable @datatable end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
5 6 7 |
# File 'app/models/effective/datatable_dsl_tool.rb', line 5 def view @view end |