Sha256: 82ee6f113d097a3c9d744b861c9af0b2c74135c4c395b157e6a6ad0aa3c1c9bf

Contents?: true

Size: 311 Bytes

Versions: 14

Compression:

Stored size: 311 Bytes

Contents

class ThinkingSphinx::Callbacks
  attr_reader :instance

  def self.callbacks(*methods)
    mod = Module.new
    methods.each do |method|
      mod.send(:define_method, method) { |instance| new(instance).send(method) }
    end
    extend mod
  end

  def initialize(instance)
    @instance = instance
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
thinking-sphinx-3.1.4 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.1.3 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.1.2 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.1.1 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.1.0 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.6 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.5 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.4 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.3 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.2 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.1 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.0 lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.0.rc lib/thinking_sphinx/callbacks.rb
thinking-sphinx-3.0.0.pre lib/thinking_sphinx/callbacks.rb