Aura
→
Aura
Aura
The main class.
Paths
Aura.root #=> "~/myapp/root"
Aura.gem_root #=> "/usr/lib/ruby/gems.../aura-0.0.1"
Files
Aura.files['models/book.rb'] #=> "~/myapp/app/models/book.rb"
Aura.files.glob('css/**/*') #=> #<Array>
Settings
Aura.set 'site.name', 'Othello'
Aura.get('site.name') #=> "Othello"
# Attempts to set the default site.name, but fails because it was
# already set previously.
Aura.default 'site.name', 'Talamasca'
puts Aura.get('site.name').inspect
#=> "Othello"
Modules
- Admin Admin stuff.
- Editor Editor stuff.
- Files Files stuff.
- Tasks Rake tasks loader.
- Utils Miscellaneous utilities.
Classes
- CLI The CLI runner.
- Extension A class representing an extension in Aura.
- Menu A menu.
- MenuItem A menu item.
- Models Models.
- Subtype A subtype.
Sinatra plugins
- Public Allows apps to use more than one public folder.
- Rendering Allows rendering from multiple engines or renderers.
- Seeder To be refactored--this sucks
Class methods
- admin Returns the Admin module.
- db_dump Returns the database backup as a hash.
- db_dump_yaml Returns the database backup as a YAML document.
- db_restore Restores a previous output of db_dump.
- editor Returns the Editor module.
- files Returns the Files module.
- find Finds a record that corresponds to a path.
- gem_root Returns the root path of the Aura gem.
- menu Returns the menu items, sorted properly.
- models Returns a list of models.
- prerelease? Checks if the Aura version is a prerelease.
- root Returns the root path of the application.
- roots Returns all model records without parents.
- run_migrations! Runs migrations for everything.
- site_empty? Checks if the site is empty.
- slugs Returns the Slugs module.
- version Returns the current version.