Class: Sunspot::Type::AbstractType

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

Overview

:nodoc:

Direct Known Subclasses

BooleanType, ClassType, FloatType, IntegerType, LocationType, StringType, TextType, TimeType

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) accepts_dynamic?

Returns:

  • (Boolean)


70
71
72
# File 'sunspot/lib/sunspot/type.rb', line 70

def accepts_dynamic?
  true
end

- (Boolean) accepts_more_like_this?

Returns:

  • (Boolean)


74
75
76
# File 'sunspot/lib/sunspot/type.rb', line 74

def accepts_more_like_this?
  false
end

- (Object) to_literal(object)

Raises:

  • (ArgumentError)


78
79
80
81
82
83
# File 'sunspot/lib/sunspot/type.rb', line 78

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