Module: Flex::ModelIndexer
- Defined in:
- lib/flex/model_indexer.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/flex/model_indexer.rb', line 4 def self.included(base) base.class_eval do @flex ||= ClassProxy::Base.new(base) @flex.extend(ClassProxy::ModelSyncer) @flex.extend(ClassProxy::ModelIndexer).init def self.flex; @flex end end end |
Instance Method Details
#flex ⇒ Object
13 14 15 |
# File 'lib/flex/model_indexer.rb', line 13 def flex @flex ||= InstanceProxy::ModelIndexer.new(self) end |
#flex_indexable? ⇒ Boolean
21 22 23 |
# File 'lib/flex/model_indexer.rb', line 21 def flex_indexable? true end |
#flex_source ⇒ Object
17 18 19 |
# File 'lib/flex/model_indexer.rb', line 17 def flex_source attributes.reject {|k| k.to_s =~ /^_*id$/} end |