Class: ResourceMapper::FailableActionOptions
- Inherits:
-
Object
- Object
- ResourceMapper::FailableActionOptions
- Extended by:
- Accessors
- Defined in:
- lib/resource_mapper/failable_action_options.rb
Instance Method Summary collapse
- #dup ⇒ Object
-
#initialize ⇒ FailableActionOptions
constructor
A new instance of FailableActionOptions.
Constructor Details
#initialize ⇒ FailableActionOptions
Returns a new instance of FailableActionOptions.
10 11 12 13 |
# File 'lib/resource_mapper/failable_action_options.rb', line 10 def initialize @success = ActionOptions.new @fails = ActionOptions.new end |
Instance Method Details
#dup ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/resource_mapper/failable_action_options.rb', line 17 def dup returning self.class.new do |duplicate| duplicate.instance_variable_set(:@success, success.dup) duplicate.instance_variable_set(:@fails, fails.dup) duplicate.instance_variable_set(:@before, before.dup) unless before.nil? end end |