Method: N4j::Node::Index#index_hashes

Defined in:
lib/n4j/index.rb

#index_hashesObject

(opts ={}) <- the normal argument pattern doesn’t really work here.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/n4j/index.rb', line 49

def index_hashes # (opts ={}) <- the normal argument pattern doesn't really work here.
  if (indexes = self.class.indexes)
    indexes.collect do |index|
      if (value = send(index))
        index = {
          "value" => send(index),
          "uri"   => url,
          "key"   => index
        }
        {:to => "#{index_path}",:method => 'POST',:body => index }
      end
    end.compact
  end
end