Sha256: aa66b37d86a3545efc8ffa8d36dd6a91caeb1156b04ccfea366817969cfe2aff

Contents?: true

Size: 445 Bytes

Versions: 59

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

require 'active_support'

class LHS::Record

  module Merge
    extend ActiveSupport::Concern

    def merge(other)
      _record.new(_data.to_h.merge(other.to_h))
    end

    def merge!(other)
      _data._raw.merge!(other.to_h)
    end

    def deep_merge(other)
      _record.new(_data.to_h.deep_merge(other.to_h))
    end

    def deep_merge!(other)
      _data._raw.deep_merge!(other.to_h)
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
lhs-21.0.0 lib/lhs/concerns/record/merge.rb
lhs-20.1.4 lib/lhs/concerns/record/merge.rb
lhs-20.1.3.pre.paginationfix.3 lib/lhs/concerns/record/merge.rb
lhs-20.1.3.pre.paginationfix.2 lib/lhs/concerns/record/merge.rb
lhs-20.1.3.pre.paginationfix.1 lib/lhs/concerns/record/merge.rb
lhs-20.1.2 lib/lhs/concerns/record/merge.rb
lhs-20.1.1 lib/lhs/concerns/record/merge.rb
lhs-20.0.0 lib/lhs/concerns/record/merge.rb
lhs-19.10.0 lib/lhs/concerns/record/merge.rb
lhs-19.9.0 lib/lhs/concerns/record/merge.rb
lhs-19.8.2 lib/lhs/concerns/record/merge.rb
lhs-19.8.1 lib/lhs/concerns/record/merge.rb
lhs-19.8.0 lib/lhs/concerns/record/merge.rb
lhs-19.7.0 lib/lhs/concerns/record/merge.rb
lhs-19.6.0 lib/lhs/concerns/record/merge.rb
lhs-19.5.0 lib/lhs/concerns/record/merge.rb
lhs-19.5.0.pre.wherehref.1 lib/lhs/concerns/record/merge.rb
lhs-19.4.1 lib/lhs/concerns/record/merge.rb
lhs-19.4.0 lib/lhs/concerns/record/merge.rb