Class: Supernova::Solr::ConnectionDummy
- Inherits:
-
Object
- Object
- Supernova::Solr::ConnectionDummy
- Defined in:
- lib/supernova/solr.rb
Instance Method Summary collapse
- #add(row) ⇒ Object
- #commit ⇒ Object
- #deprication_warning(instead) ⇒ Object
- #filter_callers(callers) ⇒ Object
Instance Method Details
#add(row) ⇒ Object
5 6 7 8 |
# File 'lib/supernova/solr.rb', line 5 def add(row) deprication_warning("add") Supernova::Solr.add(row) end |
#commit ⇒ Object
10 11 12 13 |
# File 'lib/supernova/solr.rb', line 10 def commit deprication_warning("commit!") Supernova::Solr.commit! end |
#deprication_warning(instead) ⇒ Object
15 16 17 |
# File 'lib/supernova/solr.rb', line 15 def deprication_warning(instead) puts "DEPRICATION WARNING: calling #{caller.first[/\`(.*?)\'/, 1]} is depricated. Use Supernova::Solr.#{instead} instead. Called from #{filter_callers(caller).at(1)}" end |
#filter_callers(callers) ⇒ Object
19 20 21 |
# File 'lib/supernova/solr.rb', line 19 def filter_callers(callers) callers.reject { |c| c.include?("/gems/")} end |