Class: Coruro::MailcatcherAdapter::Configuration
- Inherits:
-
Object
- Object
- Coruro::MailcatcherAdapter::Configuration
- Defined in:
- lib/coruro/mailcatcher_adapter.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #expose_stream?(stream) ⇒ Boolean
- #expose_streams ⇒ Object
- #http_root ⇒ Object
-
#initialize(config) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(config) ⇒ Configuration
Returns a new instance of Configuration.
123 124 125 |
# File 'lib/coruro/mailcatcher_adapter.rb', line 123 def initialize(config) self.config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
122 123 124 |
# File 'lib/coruro/mailcatcher_adapter.rb', line 122 def config @config end |
Instance Method Details
#expose_stream?(stream) ⇒ Boolean
131 132 133 |
# File 'lib/coruro/mailcatcher_adapter.rb', line 131 def expose_stream?(stream) !expose_streams[stream].nil? end |
#expose_streams ⇒ Object
135 136 137 |
# File 'lib/coruro/mailcatcher_adapter.rb', line 135 def expose_streams config.fetch(:expose_streams, {}) end |
#http_root ⇒ Object
127 128 129 |
# File 'lib/coruro/mailcatcher_adapter.rb', line 127 def http_root config.fetch(:http_root, 'http://localhost:1080') end |