class Relix::Keyer::Compact
Public Class Methods
new(klass, options)
click to toggle source
# File lib/relix/keyer.rb, line 69 def initialize(klass, options) @prefix = if(abbrev = options[:abbrev]) (abbrev.respond_to?(:call) ? abbrev.call(klass.name) : abbrev) else klass.name end end
Public Instance Methods
index(index, name)
click to toggle source
# File lib/relix/keyer.rb, line 81 def index(index, name) "#{@prefix}:#{name}:#{index.class.compact_kind}" end
values(pk, klass)
click to toggle source
# File lib/relix/keyer.rb, line 77 def values(pk, klass) "#{@prefix}:v:#{pk}" end