Sha256: 4e42fdabcd9ed7b8033df7f800419d7f4ef8a10ffbb32507e424f2e4c93e9f63
Contents?: true
Size: 868 Bytes
Versions: 17
Compression:
Stored size: 868 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::Search::Glaze < BasicObject def initialize(context, object, raw = {}, pane_classes = []) @object, @raw = object, raw @panes = pane_classes.collect { |klass| klass.new context, object, @raw } end def ==(object) (@object == object) || super end def equal?(object) @object.equal? object end def respond_to?(method, include_private = false) @object.respond_to?(method, include_private) || @panes.any? { |pane| pane.respond_to?(method, include_private) } end def unglazed @object end private def method_missing(method, *args, &block) pane = @panes.detect { |pane| pane.respond_to?(method) } if @object.respond_to?(method) || pane.nil? @object.send(method, *args, &block) else pane.send(method, *args, &block) end end end
Version data entries
17 entries across 17 versions & 1 rubygems