Class: ActiveTriples::NodeConfig::IndexObject

Inherits:
Object
  • Object
show all
Defined in:
lib/active_triples/node_config.rb

Overview

this enables a cleaner API for solr integration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeIndexObject

Returns a new instance of IndexObject.



91
92
93
94
# File 'lib/active_triples/node_config.rb', line 91

def initialize
  @behaviors = []
  @data_type = :string
end

Instance Attribute Details

#behaviorsEnumerator<Symbol>

Returns:



89
# File 'lib/active_triples/node_config.rb', line 89

attr_accessor :data_type, :behaviors

#data_typeSymbol

Returns:



89
90
91
# File 'lib/active_triples/node_config.rb', line 89

def data_type
  @data_type
end

Instance Method Details

#as(*args) ⇒ Array<Symbol>

Parameters:

  • Behaviors for this index object

Returns:



100
101
102
# File 'lib/active_triples/node_config.rb', line 100

def as(*args)
  @behaviors = args
end

#defaultsSymbol

Deprecated.

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

Returns :noop.

Returns:

  • :noop



114
115
116
117
118
119
# 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) ⇒ Object

Parameters:



106
107
108
# File 'lib/active_triples/node_config.rb', line 106

def type(sym)
  @data_type = sym
end