Class: Relix::Keyer::Standard

Inherits:
Object
  • Object
show all
Defined in:
lib/relix/keyer.rb

Direct Known Subclasses

Compact

Instance Method Summary collapse

Constructor Details

#initialize(klass, options) ⇒ Standard

Returns a new instance of Standard.



51
52
53
# File 'lib/relix/keyer.rb', line 51

def initialize(klass, options)
  @prefix = klass.name
end

Instance Method Details

#component(name, component) ⇒ Object



63
64
65
# File 'lib/relix/keyer.rb', line 63

def component(name, component)
  "#{name}:#{component}"
end

#index(index, name) ⇒ Object



59
60
61
# File 'lib/relix/keyer.rb', line 59

def index(index, name)
  "#{index.model_name}:#{name}:#{index.class.kind}"
end

#values(pk, klass) ⇒ Object



55
56
57
# File 'lib/relix/keyer.rb', line 55

def values(pk, klass)
  "#{@prefix}:values:#{pk}"
end