Module: CaRuby::Resource

Includes:
JSON::Serializable, Migratable, Persistable, Jinx::Resource
Defined in:
lib/caruby/resource.rb

Overview

Augments Jinx::Resource to inject Propertied persistence into introspected classes. A CaRuby application domain module includes CaRuby::Resource and extends CaRuby::Importer.

Examples:

# The application domain module.
module Domain
  # Add persistence to the domain instances.
  include CaRuby::Resource
  # Add introspection to this domain module.
  extend Jinx::Importer
  # Add persistence to the domain classes.
  @metadata_module = CaRuby::Metadata  
end

Instance Attribute Summary

Attributes included from Persistable

#snapshot

Method Summary

Methods included from Migratable

#migratable_independent_attributes

Methods included from Persistable

#add_defaults_autogenerated, #add_lazy_loader, #autogenerated?, #changed?, #changed_attributes, #copy_volatile_attributes, #create, #database, #delete, #do_without_lazy_loader, #dump, #ensure_exists, #fetch_autogenerated?, #fetch_saved?, #fetched?, #find, #loadable_attributes, #merge_into_snapshot, #persistence_service, #query, #remove_lazy_loader, #save, saved?, #saved_attributes_to_fetch, #searchable?, #searchable_attributes, #take_snapshot, unsaved?, #updatable?, #update, #validate

Methods included from JSON::Serializable

#to_json