Sha256: 9f0d27e9f075292856bbc7f1deba83556da859c6c9bdb8cbcd25fbca6d2a072e

Contents?: true

Size: 543 Bytes

Versions: 2

Compression:

Stored size: 543 Bytes

Contents

# frozen_string_literal: true

# lib/loc_mods/base_mapper.rb
require "shale"
require_relative "comparable_mapper"

module LocMods
  # Base class for all object definitions
  class BaseMapper < Shale::Mapper
    include ComparableMapper
  end

  # Nil class substitute for comparison
  class ComparableNil < BaseMapper
  end

  # Comparison of two values for ComparableMapper
  class Comparison
    attr_accessor :original, :updated

    def initialize(original:, updated:)
      @original = original
      @updated = updated
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
loc_mods-0.2.4 lib/loc_mods/base_mapper.rb
loc_mods-0.2.3 lib/loc_mods/base_mapper.rb