Class: DefraRubyEmail::Configuration
- Inherits:
-
Object
- Object
- DefraRubyEmail::Configuration
- Defined in:
- lib/defra_ruby_email/configuration.rb
Instance Attribute Summary collapse
-
#notify_api_key ⇒ Object
Returns the value of attribute notify_api_key.
Instance Method Summary collapse
-
#enable=(arg) ⇒ Object
Controls whether the mocks are enabled.
- #enabled? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 |
# File 'lib/defra_ruby_email/configuration.rb', line 8 def initialize @enable = false end |
Instance Attribute Details
#notify_api_key ⇒ Object
Returns the value of attribute notify_api_key.
6 7 8 |
# File 'lib/defra_ruby_email/configuration.rb', line 6 def notify_api_key @notify_api_key end |
Instance Method Details
#enable=(arg) ⇒ Object
Controls whether the mocks are enabled. Only if set to true will the mock pages be accessible
14 15 16 17 18 19 20 |
# File 'lib/defra_ruby_email/configuration.rb', line 14 def enable=(arg) # We implement our own setter to handle values being passed in as strings # rather than booleans parsed = arg.to_s.downcase @enable = parsed == "true" end |
#enabled? ⇒ Boolean
22 23 24 |
# File 'lib/defra_ruby_email/configuration.rb', line 22 def enabled? @enable end |