Sha256: 1ce06d7769935a4a1ba957eb0cb44d0b859de3d81ed987f277534a9fc3974400

Contents?: true

Size: 286 Bytes

Versions: 8

Compression:

Stored size: 286 Bytes

Contents

class ThinkingSphinx::RealTime::Attribute < ThinkingSphinx::RealTime::Property
  def multi?
    @options[:multi]
  end

  def type
    @options[:type]
  end

  def translate(object)
    super || default_value
  end

  private

  def default_value
    type == :string ? '' : 0
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
thinking-sphinx-3.1.4 lib/thinking_sphinx/real_time/attribute.rb
thinking-sphinx-3.1.3 lib/thinking_sphinx/real_time/attribute.rb
thinking-sphinx-3.1.2 lib/thinking_sphinx/real_time/attribute.rb
thinking-sphinx-3.1.1 lib/thinking_sphinx/real_time/attribute.rb
thinking-sphinx-3.1.0 lib/thinking_sphinx/real_time/attribute.rb
thinking-sphinx-3.0.6 lib/thinking_sphinx/real_time/attribute.rb
thinking-sphinx-3.0.5 lib/thinking_sphinx/real_time/attribute.rb
thinking-sphinx-3.0.4 lib/thinking_sphinx/real_time/attribute.rb