Sha256: 1a28bf1b31eac6c6b6c297bbe489f64a4d99d8f23fc70d134ed8060846d5827d

Contents?: true

Size: 578 Bytes

Versions: 66

Compression:

Stored size: 578 Bytes

Contents

require 'active_support/concern'
require 'curation_concerns/callbacks/registry'

module CurationConcerns
  module Callbacks
    extend ActiveSupport::Concern

    included do
      # Define class instance variable as endpoint to the
      # Callback::Registry api.
      @callback = Registry.new
    end

    module ClassMethods
      # Reader for class instance variable containing callback definitions.
      def callback
        @callback
      end
    end

    # Accessor to Callback::Registry api for instances.
    def callback
      self.class.callback
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.7 lib/curation_concerns/callbacks.rb
curation_concerns-2.0.0 lib/curation_concerns/callbacks.rb
curation_concerns-2.0.0.rc2 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.6 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.5 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.4 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.3 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.2 lib/curation_concerns/callbacks.rb
curation_concerns-2.0.0.rc1 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.1 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.7.0.beta1 lib/curation_concerns/callbacks.rb
curation_concerns-1.6.3 lib/curation_concerns/callbacks.rb
curation_concerns-1.6.2 lib/curation_concerns/callbacks.rb
curation_concerns-1.6.1 lib/curation_concerns/callbacks.rb
curation_concerns-1.6.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.5.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.4.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.3.3 lib/curation_concerns/callbacks.rb