Class: Admin::Base::ActionHandler
- Inherits:
-
Object
- Object
- Admin::Base::ActionHandler
- Defined in:
- lib/admin/base/action_handler.rb
Instance Attribute Summary collapse
-
#actor ⇒ Object
(also: #current_user)
readonly
Returns the value of attribute actor.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(record, actor, params = {}) ⇒ ActionHandler
constructor
A new instance of ActionHandler.
Constructor Details
#initialize(record, actor, params = {}) ⇒ ActionHandler
Returns a new instance of ActionHandler.
10 11 12 13 14 |
# File 'lib/admin/base/action_handler.rb', line 10 def initialize(record, actor, params = {}) @record = record @actor = actor @params = params end |
Instance Attribute Details
#actor ⇒ Object (readonly) Also known as: current_user
Returns the value of attribute actor.
6 7 8 |
# File 'lib/admin/base/action_handler.rb', line 6 def actor @actor end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'lib/admin/base/action_handler.rb', line 6 def params @params end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
6 7 8 |
# File 'lib/admin/base/action_handler.rb', line 6 def record @record end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/admin/base/action_handler.rb', line 16 def call raise NotImplementedError, "Subclasses must implement #call" end |