Aura Aura Extension

Extension

A class representing an extension in Aura.

Lookup

Get an Extension instance by passing an extension name.

ext = Aura::Extension['base']

Loading extensions

ext.active?          #=> false (probably)
ext.load!
ext.active?          #=> true

Getting extension info

These are loaded from an extension's YAML file.

ext.info             #=> #<OStruct>
ext.info.author

Getting paths

Use Aura::Extension#path.

ext.path             #=> ~/aura/extensions/base
ext.path('init.rb')  #=> ~/aura/extensions/base/init.rb

Aura::Extension.active  # Active extensions (Array of #<Extension>)
Aura::Extension.all     # All extensions (Array of #<Extension>)

Manual instanciation

You can pass a path to the constructor.

ext = Aura::Extension.new('/path/to/ext')

Class methods

  • active Returns all the extensions that are loaded in the config.
  • active_names Returns all names of the extensions that are loaded in the config.
  • all Returns all extensions (not just the ones loaded).

Methods

  • active? Determines if the given extension is currently active in the config.
  • info Returns an OpenStruct of information on the extension.
  • load! Loads an extension.
  • path Returns the path of the extension.