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.3.2 lib/curation_concerns/callbacks.rb
curation_concerns-1.3.1 lib/curation_concerns/callbacks.rb
curation_concerns-1.3.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.2.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.1.2 lib/curation_concerns/callbacks.rb
curation_concerns-1.1.1 lib/curation_concerns/callbacks.rb
curation_concerns-1.1.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta10 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta9 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta8 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta7 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta6 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta5 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta4 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta3 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta2 lib/curation_concerns/callbacks.rb
curation_concerns-1.0.0.beta1 lib/curation_concerns/callbacks.rb
curation_concerns-0.14.0 lib/curation_concerns/callbacks.rb
curation_concerns-0.14.0.pre4 lib/curation_concerns/callbacks.rb