Sha256: ac92d204a599beca991c4f5768efc35b57ae1bdc3ec9597dd9a5bf2f975d4a5a

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

module Raisin
  class Namespace
    include Exposable

    attr_reader :path, :methods, :filters

    def initialize(path)
      super

      @path = path
      @methods = []
      @filters = {
        before: [],
        after:  [],
        around: []
      }
    end

    def add(method)
      @methods << method
    end

    def filter(type, *args, &block)
      @filters[type] << [args.first, block]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
raisin-0.0.5 lib/raisin/namespace.rb
raisin-0.0.4 lib/raisin/namespace.rb