Component Defaults

The following Model components may have default values set:

For example, in your config.rb:

Notifier::Mail.defaults do |mail|
  mail.from                 = ''                   = ''
  mail.address              = ''
  mail.port                 = 587
  mail.domain               = ''
  mail.user_name            = ''
  mail.password             = 'my_password'
  mail.authentication       = 'plain'
  mail.encryption           = :starttls

This allows you to add these components to any Model, with some or all options already set., 'John Smith Backup') do

  archive :user_music do |archive|
    archive.add '~/music'

  # this will notify using the default settings
  notify_by Mail

  # this will use the defaults, except for the new recipient
  notify_by Mail do |mail| = ''


Any value you specify when defining your Model will override default values.

Note that some components have settings that can not have default values.