Sha256: e00a2124a2a5435382b3789f8ab39a36b83f48c1c10ec31461a3d28bda8d6e46
Contents?: true
Size: 534 Bytes
Versions: 35
Compression:
Stored size: 534 Bytes
Contents
# frozen_string_literal: true module Renalware module HD class ReviseHDProfile def initialize(profile) raise(ArgumentError, "Cannot revise a new Profile") unless profile.persisted? @profile = profile end def call(params) profile.assign_attributes(params) return true unless profile.changed? return false unless profile.valid? profile.restore_attributes profile.supersede!(params) end private attr_reader :profile end end end
Version data entries
35 entries across 35 versions & 1 rubygems