Class: Coruro::MailcatcherAdapter::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/coruro/mailcatcher_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject

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

Returns:

  • (Boolean)


131
132
133
# File 'lib/coruro/mailcatcher_adapter.rb', line 131

def expose_stream?(stream)
  !expose_streams[stream].nil?
end

#expose_streamsObject



135
136
137
# File 'lib/coruro/mailcatcher_adapter.rb', line 135

def expose_streams
  config.fetch(:expose_streams, {})
end

#http_rootObject



127
128
129
# File 'lib/coruro/mailcatcher_adapter.rb', line 127

def http_root
  config.fetch(:http_root, 'http://localhost:1080')
end