lib/picky/indexes.rb in picky-0.2.2 vs lib/picky/indexes.rb in picky-0.2.3
- old
+ new
@@ -69,17 +69,17 @@
# Backup / Restore.
#
def self.backup_caches
each_category do |category|
- category.full.backup
+ category.exact.backup
category.partial.backup
end
end
def self.restore_caches
each_category do |category|
- category.full.restore
+ category.exact.restore
category.partial.restore
end
end
# Use these if you need to index / cache a single index.
@@ -120,34 +120,34 @@
# Checks if the caches are there.
#
def self.check_caches
each do |type|
type.categories.each do |category|
- category.full.raise_unless_cache_exists
+ category.exact.raise_unless_cache_exists
category.partial.raise_unless_cache_exists
end
end
end
# Removes the cache files.
#
def self.clear_caches
each do |type|
type.categories.each do |category|
- category.full.delete_all
+ category.exact.delete_all
category.partial.delete_all
end
end
end
# Creates the directory structure for the indexes.
#
# TODO Should be on type?
#
def self.create_directory_structure
- each_bundle do |full, partial|
- full.create_directory
+ each_bundle do |exact, partial|
+ exact.create_directory
partial.create_directory
end
end
#
@@ -165,10 +165,10 @@
type.categories.each &block
end
end
def self.each_bundle
each_category do |category|
- yield category.full, category.partial
+ yield category.exact, category.partial
end
end
def self.add type
self.type_mapping ||= {}
\ No newline at end of file