Class: InboxSync::Config

Inherits:
Object
  • Object
show all
Includes:
NsOptions::Proxy
Defined in:
lib/inbox-sync/config.rb,
lib/inbox-sync/config/filter.rb,
lib/inbox-sync/config/credentials.rb,
lib/inbox-sync/config/imap_config.rb,
lib/inbox-sync/config/smtp_config.rb

Defined Under Namespace

Classes: Credentials, Filter, IMAPConfig, SMTPConfig

Instance Method Summary collapse

Instance Method Details

#filter(*args, &block) ⇒ Object



21
22
23
# File 'lib/inbox-sync/config.rb', line 21

def filter(*args, &block)
  filters << Filter.new(*args, &block)
end

#validate!Object



25
26
27
28
29
30
31
32
33
# File 'lib/inbox-sync/config.rb', line 25

def validate!
  if !required_set?
    raise ArgumentError, "some required configs are missing"
  end

  source.validate!
  dest.validate!
  notify.validate!
end