module Decanter::Extensions::ClassMethods
Public Instance Methods
Source
# File lib/decanter/extensions.rb, line 36 def decant(args, options = {}) if (specified_decanter = options[:decanter]) Decanter.decanter_from(specified_decanter) else Decanter.decanter_for(self) end.decant(args) end
Source
# File lib/decanter/extensions.rb, line 22 def decant_create(args, **options) self.new(decant(args, options)) .save(context: options[:context]) end
Source
# File lib/decanter/extensions.rb, line 31 def decant_create!(args, **options) self.new(decant(args, options)) .save!(context: options[:context]) end
Source
# File lib/decanter/extensions.rb, line 27 def decant_new(args, **options) self.new(decant(args, options)) end