Sha256: af77ef8973a968175a1b1bd915283926f2587161ec78df2e4c82b04d28be247b

Contents?: true

Size: 635 Bytes

Versions: 12

Compression:

Stored size: 635 Bytes

Contents

module Refinery
  class Configuration

    def after_inclusion_procs
      @@after_inclusion_procs ||= []
    end

    def after_inclusion(&blk)
      if blk && blk.respond_to?(:call)
        after_inclusion_procs << blk
      else
        raise 'Anything added to be called before_inclusion must be callable.'
      end
    end

    def before_inclusion_procs
      @@before_inclusion_procs ||= []
    end

    def before_inclusion(&blk)
      if blk && blk.respond_to?(:call)
        before_inclusion_procs << blk
      else
        raise 'Anything added to be called before_inclusion must be callable.'
      end
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
refinerycms-core-1.0.11 lib/refinery/configuration.rb
refinerycms-core-1.0.10 lib/refinery/configuration.rb
refinerycms-core-1.0.9 lib/refinery/configuration.rb
refinerycms-core-1.0.8 lib/refinery/configuration.rb
refinerycms-core-1.0.7 lib/refinery/configuration.rb
refinerycms-core-1.0.5 lib/refinery/configuration.rb
refinerycms-core-1.0.4 lib/refinery/configuration.rb
refinerycms-core-1.0.3 lib/refinery/configuration.rb
refinerycms-core-1.0.1 lib/refinery/configuration.rb
refinerycms-core-1.0.0 lib/refinery/configuration.rb
refinerycms-core-0.9.9.22 lib/refinery/configuration.rb
refinerycms-core-0.9.9.21 lib/refinery/configuration.rb