Class: EmailAddress::Config::Setup
- Inherits:
-
Object
- Object
- EmailAddress::Config::Setup
- Defined in:
- lib/email_address/config.rb
Instance Attribute Summary collapse
-
#providers ⇒ Object
readonly
Returns the value of attribute providers.
Instance Method Summary collapse
- #do_block(&block) ⇒ Object
-
#initialize ⇒ Setup
constructor
A new instance of Setup.
- #option(name, value) ⇒ Object
- #provider(name, defn = {}) ⇒ Object
Constructor Details
#initialize ⇒ Setup
Returns a new instance of Setup.
56 57 58 |
# File 'lib/email_address/config.rb', line 56 def initialize @providers = {} end |
Instance Attribute Details
#providers ⇒ Object (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.[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 |