Class: EmailAddress::Config::Setup

Inherits:
Object
  • Object
show all
Defined in:
lib/email_address/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSetup

Returns a new instance of Setup.



56
57
58
# File 'lib/email_address/config.rb', line 56

def initialize
  @providers = {}
end

Instance Attribute Details

#providersObject (readonly)

Returns the value of attribute providers.



54
55
56
# File 'lib/email_address/config.rb', line 54

def providers
  @providers
end

Instance Method Details

#do_block(&block) ⇒ Object



60
61
62
# File 'lib/email_address/config.rb', line 60

def do_block(&block)
  instance_eval(&block)
end

#option(name, value) ⇒ Object



68
69
70
# File 'lib/email_address/config.rb', line 68

def option(name, value)
  EmailAddress::Config.options[name.to_sym] = value
end

#provider(name, defn = {}) ⇒ Object



64
65
66
# File 'lib/email_address/config.rb', line 64

def provider(name, defn={})
  EmailAddress::Config.providers[name] = defn
end