Sha256: 93f37eb282aa3117fcfbda720c06eca854b48a89431149defcdb5ceb16a834f5

Contents?: true

Size: 710 Bytes

Versions: 12

Compression:

Stored size: 710 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

12 entries across 12 versions & 1 rubygems

Version Path
thredded-0.12.1 lib/thredded/view_hooks/config.rb
thredded-0.12.0 lib/thredded/view_hooks/config.rb
thredded-0.11.1 lib/thredded/view_hooks/config.rb
thredded-0.11.0 lib/thredded/view_hooks/config.rb
thredded-0.10.1 lib/thredded/view_hooks/config.rb
thredded-0.10.0 lib/thredded/view_hooks/config.rb
thredded-0.9.4 lib/thredded/view_hooks/config.rb
thredded-0.9.3 lib/thredded/view_hooks/config.rb
thredded-0.9.2 lib/thredded/view_hooks/config.rb
thredded-0.9.1 lib/thredded/view_hooks/config.rb
thredded-0.8.4 lib/thredded/view_hooks/config.rb
thredded-0.8.2 lib/thredded/view_hooks/config.rb