Sha256: 9c18cdaea01dbe59bb12cf23b90020110545160a1cd3204c17ef4008666e61b2

Contents?: true

Size: 332 Bytes

Versions: 11

Compression:

Stored size: 332 Bytes

Contents

# frozen_string_literal: true

module Micro::Attributes
  module Features
    module Diff
      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
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
u-attributes-2.8.0 lib/micro/attributes/features/diff.rb
u-attributes-2.7.0 lib/micro/attributes/features/diff.rb
u-attributes-2.6.0 lib/micro/attributes/features/diff.rb
u-attributes-2.5.0 lib/micro/attributes/features/diff.rb
u-attributes-2.4.0 lib/micro/attributes/features/diff.rb
u-attributes-2.3.0 lib/micro/attributes/features/diff.rb
u-attributes-2.2.0 lib/micro/attributes/features/diff.rb
u-attributes-2.1.1 lib/micro/attributes/features/diff.rb
u-attributes-2.1.0 lib/micro/attributes/features/diff.rb
u-attributes-2.0.1 lib/micro/attributes/features/diff.rb
u-attributes-2.0.0 lib/micro/attributes/features/diff.rb