Sha256: 30a18635e8804445a22d5bd6b002021a6121185ce7abfdbc55e2e5ac96e882e1

Contents?: true

Size: 566 Bytes

Versions: 40

Compression:

Stored size: 566 Bytes

Contents

module Galakei
  module Filter
    class Base
      attr_accessor :controller

      def self.condition?(controller)
        @instance ||= self.new
        @instance.controller = controller
        @instance.condition?
      end

      def self.filter(controller, &block)
        @instance ||= self.new
        @instance.controller = controller
        @instance.filter(&block)
      end

      def method_missing(m, *args)
        if controller.respond_to?(m)
          controller.send(m, *args)
        else
          super
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
galakei-0.6.3 lib/galakei/filter/base.rb
galakei-0.6.2 lib/galakei/filter/base.rb
galakei-0.6.1 lib/galakei/filter/base.rb
galakei-0.6.0 lib/galakei/filter/base.rb
galakei-0.5.1 lib/galakei/filter/base.rb
galakei-0.5.0 lib/galakei/filter/base.rb
galakei-0.4.1 lib/galakei/filter/base.rb
galakei-0.4.0 lib/galakei/filter/base.rb
galakei-0.3.8 lib/galakei/filter/base.rb
galakei-0.3.7 lib/galakei/filter/base.rb
galakei-0.3.6 lib/galakei/filter/base.rb
galakei-0.3.5 lib/galakei/filter/base.rb
galakei-0.3.4 lib/galakei/filter/base.rb
galakei-0.3.3 lib/galakei/filter/base.rb
galakei-0.3.2 lib/galakei/filter/base.rb
galakei-0.3.1 lib/galakei/filter/base.rb
galakei-0.3.0 lib/galakei/filter/base.rb
galakei-0.2.0 lib/galakei/filter/base.rb
galakei-0.1.0 lib/galakei/filter/base.rb
galakei-0.0.1 lib/galakei/filter/base.rb