Module: Ripple::Indexes::ClassMethods
- Defined in:
- lib/ripple/indexes.rb
Instance Method Summary collapse
- #index(key, type, &block) ⇒ Object
-
#indexes ⇒ Object
Indexes defined on the document.
- #indexes=(idx) ⇒ Object
- #inherited(subclass) ⇒ Object
- #property(key, type, options = {}) ⇒ Object
Instance Method Details
#index(key, type, &block) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/ripple/indexes.rb', line 32 def index(key, type, &block) if block_given? indexes[key] = Index.new(key, type, &block) else indexes[key] = Index.new(key, type) end end |
#indexes ⇒ Object
Indexes defined on the document.
17 18 19 |
# File 'lib/ripple/indexes.rb', line 17 def indexes @indexes ||= {}.with_indifferent_access end |
#indexes=(idx) ⇒ Object
21 22 23 |
# File 'lib/ripple/indexes.rb', line 21 def indexes=(idx) @indexes = idx end |
#inherited(subclass) ⇒ Object
11 12 13 14 |
# File 'lib/ripple/indexes.rb', line 11 def inherited(subclass) super subclass.indexes = indexes.dup end |