Class: Pageflow::Admin::ExtensibleAttributesTable::RowDelegator Private
- Inherits:
-
Object
- Object
- Pageflow::Admin::ExtensibleAttributesTable::RowDelegator
- Defined in:
- app/views/components/pageflow/admin/extensible_attributes_table.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(context, row_handler) ⇒ RowDelegator
constructor
private
A new instance of RowDelegator.
- #row(name, options = {}) ⇒ Object private
Constructor Details
#initialize(context, row_handler) ⇒ RowDelegator
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RowDelegator.
62 63 64 65 |
# File 'app/views/components/pageflow/admin/extensible_attributes_table.rb', line 62 def initialize(context, row_handler) @context = context @row_handler = row_handler end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Normally we would delegate to super if context does not respond_to? method. But Arbre appears to report not to repond to helpers like authorized? even if it does.
This is also the reason we can not use SimpleDelegator here and also delegate_missing in Rails 5 would not work.
83 84 85 |
# File 'app/views/components/pageflow/admin/extensible_attributes_table.rb', line 83 def method_missing(method, ...) @context.public_send(method, ...) end |
Instance Method Details
#row(name, options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
67 68 69 |
# File 'app/views/components/pageflow/admin/extensible_attributes_table.rb', line 67 def row(name, = {}, &) @row_handler.row(name, , &) end |