Sha256: 24dfc51e20f2bc7f95b0a67e172406fb44a56e25a69183133f09ae76ed71153c

Contents?: true

Size: 711 Bytes

Versions: 42

Compression:

Stored size: 711 Bytes

Contents

# frozen_string_literal: true

module Thredded
  module ViewHooks
    class Config
      def initialize
        # @type Array<Proc>
        @before = []
        # @type Array<Proc>
        @replace = []
        # @type Array<Proc>
        @after = []
      end

      # @param [Proc] block
      # @return [Array<Proc>]
      def before(&block)
        @before << block if block
        @before
      end

      # @param [Proc] block
      # @return [Array<Proc>]
      def replace(&block)
        @replace << block if block
        @replace
      end

      # @param [Proc] block
      # @return [Array<Proc>]
      def after(&block)
        @after << block if block
        @after
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
thredded-0.15.4 lib/thredded/view_hooks/config.rb
thredded-0.15.3 lib/thredded/view_hooks/config.rb
thredded-0.15.2 lib/thredded/view_hooks/config.rb
thredded-0.15.1 lib/thredded/view_hooks/config.rb
threddedDANIEL-0.14.5 lib/thredded/view_hooks/config.rb
thredded-0.14.4 lib/thredded/view_hooks/config.rb
thredded-0.14.3 lib/thredded/view_hooks/config.rb
thredded-0.14.2 lib/thredded/view_hooks/config.rb
thredded-0.14.1 lib/thredded/view_hooks/config.rb
thredded-0.14.0 lib/thredded/view_hooks/config.rb
thredded-0.13.8 lib/thredded/view_hooks/config.rb
thredded-0.13.7 lib/thredded/view_hooks/config.rb
thredded-0.13.6 lib/thredded/view_hooks/config.rb
thredded-0.13.5 lib/thredded/view_hooks/config.rb
thredded-0.13.4 lib/thredded/view_hooks/config.rb
thredded-0.13.3 lib/thredded/view_hooks/config.rb
thredded-0.13.2 lib/thredded/view_hooks/config.rb
thredded-0.13.1 lib/thredded/view_hooks/config.rb
thredded-0.13.0 lib/thredded/view_hooks/config.rb
thredded-0.12.4 lib/thredded/view_hooks/config.rb