Module: Granite::AssignData::ClassMethods
- Defined in:
- lib/granite/assign_data.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#assign_data(*methods, **options, &block) ⇒ Object
Defines a callback to call when assigning data from business action to model.
Instance Method Details
#assign_data(*methods, **options, &block) ⇒ Object
Defines a callback to call when assigning data from business action to model.
23 24 25 26 |
# File 'lib/granite/assign_data.rb', line 23 def assign_data(*methods, **, &block) self.data_assignments += methods.map { |method| DataAssignment.new(method, ) } self.data_assignments += [DataAssignment.new(block, )] if block end |