Class: Relix::Keyer::Standard
- Inherits:
-
Object
- Object
- Relix::Keyer::Standard
- Defined in:
- lib/relix/keyer.rb
Direct Known Subclasses
Instance Method Summary collapse
- #component(name, component) ⇒ Object
- #index(index, name) ⇒ Object
-
#initialize(klass, options) ⇒ Standard
constructor
A new instance of Standard.
- #values(pk, klass) ⇒ Object
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, ) @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 |