class Ork::Model::Index
Public Class Methods
new(name, type = 'bin')
click to toggle source
# File lib/ork/model/index.rb, line 4 def initialize(name, type = 'bin') @name, @type = name, type end
Public Instance Methods
riak_name()
click to toggle source
Index
name in riak format
# File lib/ork/model/index.rb, line 9 def riak_name "#@name\_#@type" end
value_from(attributes)
click to toggle source
Take the attributes needed by the index. It’s best to normalize or encode any user-supplied data before using it as an index
# File lib/ork/model/index.rb, line 16 def value_from(attributes) Array(attributes[@name]).to_set end