Sha256: 3beeb90a3fe65cc79a1800431bc6375f399fe8a036f9a13099897e1a7e8d7fd9

Contents?: true

Size: 397 Bytes

Versions: 2

Compression:

Stored size: 397 Bytes

Contents

# frozen_string_literal: true

module PriceHubble
  module Concern
    # Define all the base callbacks of a common entity.
    module Callbacks
      extend ActiveSupport::Concern

      class_methods do
        include ActiveModel::Callbacks
      end

      included do
        # Define all the base callbacks
        define_model_callbacks :initialize, only: :after
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pricehubble-1.5.1 lib/price_hubble/entity/concern/callbacks.rb
pricehubble-1.5.0 lib/price_hubble/entity/concern/callbacks.rb