Class: DefraRubyEmail::Configuration
- Inherits:
-
Object
- Object
- DefraRubyEmail::Configuration
- Defined in:
- lib/defra_ruby_email/configuration.rb
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.
6 7 8 |
# File 'lib/defra_ruby_email/configuration.rb', line 6 def initialize @enable = false end |
Instance Method Details
#enable=(arg) ⇒ Object
Controls whether the mocks are enabled. Only if set to true will the mock pages be accessible
12 13 14 15 16 17 18 |
# File 'lib/defra_ruby_email/configuration.rb', line 12 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
20 21 22 |
# File 'lib/defra_ruby_email/configuration.rb', line 20 def enabled? @enable end |