Module: Ext

Defined in:
lib/ext.rb,
lib/ext/og.rb,
lib/ext/view.rb,
lib/ext/flash.rb,
lib/ext/mount.rb,
lib/ext/command.rb,
lib/ext/forward.rb,
lib/ext/logging.rb,
lib/ext/app_util.rb,
lib/ext/controls.rb,
lib/ext/resource.rb,
lib/ext/security.rb,
lib/ext/sendfile.rb,
lib/ext/settings.rb,
lib/ext/xml_view.rb,
lib/ext/xul_view.rb,
lib/ext/view_slot.rb,
lib/ext/basic_auth.rb,
lib/ext/eruby_view.rb,
lib/ext/js_helpers.rb,
lib/ext/og_session.rb,
lib/ext/use_helper.rb,
lib/ext/og_scaffold.rb,
lib/ext/form_helpers.rb,
lib/ext/template_view.rb,
lib/ext/negociate_content.rb

Overview

This module should be included in your app if you want to use any equipment. It’s also used as a namespace for the various extensions.

Defined Under Namespace

Modules: AppUtil, BasicAuth, Command, Controls, ErubyView, Flash, FormHelpers, Forward, JsHelpers, Logging, Mount, NegociateContent, Og, OgScaffold, OgSession, Resource, Security, Sendfile, Settings, TemplateView, UseHelper, View, ViewSlot, XmlView, XulView

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extendable(mod) ⇒ Object Also known as: endable

Utility method that adds extension mechanism to any module.



8
9
10
# File 'lib/ext.rb', line 8

def extendable(mod)
  mod.extend self
end

Instance Method Details

#createObject

Create terminator.



28
29
30
31
# File 'lib/ext.rb', line 28

def create 
  puts "INFO: Ext#create called" if $DBG
  self
end

#equip(*exts) ⇒ Object

Shortcut method to add an equipment to the app.

You can use YourApp.equip(Extension) instead of Extension.equip(YourApp) once this extension is installed.



23
24
25
# File 'lib/ext.rb', line 23

def equip(*exts)
  exts.each{|ext| ext.equip(self)}
end

#equipmentsObject

List of extensions already in the application



15
# File 'lib/ext.rb', line 15

def equipments; @equipments ||= [] end