Class: Lore::Cache::File_Index
- Inherits:
-
Model
- Object
- Table_Accessor
- Model
- Lore::Cache::File_Index
- Defined in:
- lib/lore/cache/file_index.rb
Instance Attribute Summary
Attributes inherited from Table_Accessor
#attribute_types, #attributes, #constraints, #foreign_keys, #primary_keys
Class Method Summary collapse
- .delete_entry(table_name) ⇒ Object
-
.for(table_name) ⇒ Object
Return array of cache file names depending from model.
Methods inherited from Model
Methods included from Cacheable
#cache_params, #create_cache, #create_cache!, #invalidate, #invalidate_all, #is_cacheable, #is_cached, #read_cache
Methods included from Query_Shortcuts
#all, #all_with, #delete, #delete_all, #each, #find, #set, #value_of
Methods included from Validation
Methods included from Aspect
#after_commit, #after_instance_delete, #before_commit, #before_instance_delete
Methods included from Migration
#bootstrap, #has_attributes, #update_schema
Methods inherited from Table_Accessor
[], context, create, create_entity_cache, create_shallow, delete, entity_cache, execute_prepared, explicit_insert, flush_entity_cache, get_all_table_names, get_constraints, get_context, get_explicit_attributes, get_foreign_keys, get_implicit_attributes, get_primary_keys, get_sequences, get_table_name, get_table_names, #initialize, inspect, key_array, load, #log, log, method_missing, prepare, read_entity_cache, select, select_by_key, select_query, select_value, select_values, set_explicit_attributes, set_foreign_keys, set_implicit_attributes, set_sequences, set_table_name, table, table_name, update, use_entity_cache, validate_params?
Methods included from Model_Shortcuts
Methods included from Table_Instance
#<=>, #==, #===, #[], #[]=, #abs_attr, #attr, #commit, #delete, #get_attribute_values, #get_label_string, #get_primary_key_values, #id, #inspect, #is_cached_entity?, #key, #marshal_dump, #marshal_load, #method_missing, #move, #set_attribute_value, #setup_instance, #table_accessor, #touched?
Constructor Details
This class inherits a constructor from Lore::Table_Accessor
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Lore::Table_Instance
Class Method Details
.delete_entry(table_name) ⇒ Object
24 25 26 27 28 |
# File 'lib/lore/cache/file_index.rb', line 24 def self.delete_entry(table_name) delete { |i| i.where(i.model == table_name) } end |
.for(table_name) ⇒ Object
Return array of cache file names depending from model
16 17 18 19 20 21 22 |
# File 'lib/lore/cache/file_index.rb', line 16 def self.for(table_name) select { |i| i.where(i.model == table_name) }.collect { |index| index.file } end |