Class: Sunspot::Type::AbstractType

Inherits:
Object
  • Object
show all
Defined in:
lib/sunspot/type.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instanceObject



62
63
64
# File 'lib/sunspot/type.rb', line 62

def instance
  @instance ||= new
end

Instance Method Details

#accepts_dynamic?Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/sunspot/type.rb', line 68

def accepts_dynamic?
  true
end

#accepts_more_like_this?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/sunspot/type.rb', line 72

def accepts_more_like_this?
  false
end

#to_literal(object) ⇒ Object

Raises:

  • (ArgumentError)


76
77
78
79
80
81
# File 'lib/sunspot/type.rb', line 76

def to_literal(object)
  raise(
    ArgumentError,
    "#{self.class.name} cannot be used as a Solr literal"
  )
end