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.13.0 lib/galakei/filter/base.rb
galakei-0.12.1 lib/galakei/filter/base.rb
galakei-0.12.0 lib/galakei/filter/base.rb
galakei-0.11.3 lib/galakei/filter/base.rb
galakei-0.11.2 lib/galakei/filter/base.rb
galakei-0.11.1 lib/galakei/filter/base.rb
galakei-0.11.0 lib/galakei/filter/base.rb
galakei-0.10.1 lib/galakei/filter/base.rb
galakei-0.10.0 lib/galakei/filter/base.rb
galakei-0.9.1 lib/galakei/filter/base.rb
galakei-0.9.0 lib/galakei/filter/base.rb
galakei-0.8.1 lib/galakei/filter/base.rb
galakei-0.8.0 lib/galakei/filter/base.rb
galakei-0.7.3 lib/galakei/filter/base.rb
galakei-0.7.2 lib/galakei/filter/base.rb
galakei-0.7.1 lib/galakei/filter/base.rb
galakei-0.7.0 lib/galakei/filter/base.rb
galakei-0.6.6 lib/galakei/filter/base.rb
galakei-0.6.5 lib/galakei/filter/base.rb
galakei-0.6.4 lib/galakei/filter/base.rb