Sha256: 358be3f017ede3a2e39cdd313dd53e6723f860c78c2211b1d43f69f50068c88b
Contents?: true
Size: 535 Bytes
Versions: 39
Compression:
Stored size: 535 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
39 entries across 39 versions & 1 rubygems