Module: Micro::Attributes::Features::Diff

Defined in:
lib/micro/attributes/features/diff.rb

Instance Method Summary collapse

Instance Method Details

#diff_attributes(to) ⇒ Object

Raises:

  • (ArgumentError)


6
7
8
9
10
# File 'lib/micro/attributes/features/diff.rb', line 6

def diff_attributes(to)
  return Micro::Attributes::Diff::Changes.new(from: self, to: to) if to.is_a?(::Micro::Attributes)

  raise ArgumentError, "#{to.inspect} must implement Micro::Attributes"
end