class ThinkingSphinx::RealTime::Translator
Attributes
column[R]
object[R]
Public Class Methods
call(object, column)
click to toggle source
# File lib/thinking_sphinx/real_time/translator.rb, line 2 def self.call(object, column) new(object, column).call end
new(object, column)
click to toggle source
# File lib/thinking_sphinx/real_time/translator.rb, line 6 def initialize(object, column) @object, @column = object, column end
Public Instance Methods
call()
click to toggle source
# File lib/thinking_sphinx/real_time/translator.rb, line 10 def call return name unless name.is_a?(Symbol) return result unless result.is_a?(String) result.gsub "\u0000", '' end
Private Instance Methods
name()
click to toggle source
# File lib/thinking_sphinx/real_time/translator.rb, line 21 def name @column.__name end
owner()
click to toggle source
# File lib/thinking_sphinx/real_time/translator.rb, line 25 def owner stack.inject(object) { |previous, node| previous.try node } end
result()
click to toggle source
# File lib/thinking_sphinx/real_time/translator.rb, line 29 def result @result ||= owner.try name end
stack()
click to toggle source
# File lib/thinking_sphinx/real_time/translator.rb, line 33 def stack @column.__stack end