class ActiveTriples::NodeConfig::IndexObject

this enables a cleaner API for solr integration

Attributes

behaviors[RW]

@!attribute data_type [rw]

@return [Symbol]

@!attribute behaviors [rw]

@return [Enumerator<Symbol>]
data_type[RW]

@!attribute data_type [rw]

@return [Symbol]

@!attribute behaviors [rw]

@return [Enumerator<Symbol>]

Public Class Methods

new() click to toggle source
# File lib/active_triples/node_config.rb, line 91
def initialize
  @behaviors = []
  @data_type = :string
end

Public Instance Methods

as(*args) click to toggle source

@param [Array<Symbol>] *args Behaviors for this index object

@return [Array<Symbol>]

# File lib/active_triples/node_config.rb, line 100
def as(*args)
  @behaviors = args
end
defaults() click to toggle source

@deprecated Omit calls to this method; it has always been a no-op.

@return [Symbol] :noop

# File lib/active_triples/node_config.rb, line 114
def defaults # no-op
  warn 'DEPRECATION: `ActiveTriples::NodeConfig::IndexObject#defaults` ' \
       'will be removed in 1.0. If you are doing `index.defaults` in a ' \
       'property config block, you can simply omit the call.'
  :noop
end
type(sym) click to toggle source

@param sym [Symbol]

# File lib/active_triples/node_config.rb, line 106
def type(sym)
  @data_type = sym
end